Ville Skyttä 4 years ago
parent 3af73eac22
commit b8ac60acc1

@ -141,9 +141,13 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
c.CPU = int32(t) c.CPU = int32(t)
case "vendorId", "vendor_id": case "vendorId", "vendor_id":
c.VendorID = value c.VendorID = value
case "CPU implementer":
if value == "0x41" {
c.VendorID = "ARM"
}
case "cpu family": case "cpu family":
c.Family = value c.Family = value
case "model": case "model", "CPU part":
c.Model = value c.Model = value
case "model name", "cpu": case "model name", "cpu":
c.ModelName = value c.ModelName = value
@ -153,7 +157,7 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
c.Family = "POWER" c.Family = "POWER"
c.VendorID = "IBM" c.VendorID = "IBM"
} }
case "stepping", "revision": case "stepping", "revision", "CPU revision":
val := value val := value
if key == "revision" { if key == "revision" {

@ -141,9 +141,13 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
c.CPU = int32(t) c.CPU = int32(t)
case "vendorId", "vendor_id": case "vendorId", "vendor_id":
c.VendorID = value c.VendorID = value
case "CPU implementer":
if value == "0x41" {
c.VendorID = "ARM"
}
case "cpu family": case "cpu family":
c.Family = value c.Family = value
case "model": case "model", "CPU part":
c.Model = value c.Model = value
case "model name", "cpu": case "model name", "cpu":
c.ModelName = value c.ModelName = value
@ -153,7 +157,7 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
c.Family = "POWER" c.Family = "POWER"
c.VendorID = "IBM" c.VendorID = "IBM"
} }
case "stepping", "revision": case "stepping", "revision", "CPU revision":
val := value val := value
if key == "revision" { if key == "revision" {

Loading…
Cancel
Save