Merge pull request #269 from andhe/ppc64le
Allow clock field in /proc/cpuinfo as cpu MHz fallback value
This commit is contained in:
commit
c2dd8ca3d4
|
@ -152,9 +152,9 @@ func Info() ([]InfoStat, error) {
|
|||
return ret, err
|
||||
}
|
||||
c.Stepping = int32(t)
|
||||
case "cpu MHz":
|
||||
case "cpu MHz", "clock":
|
||||
// treat this as the fallback value, thus we ignore error
|
||||
if t, err := strconv.ParseFloat(value, 64); err == nil {
|
||||
if t, err := strconv.ParseFloat(strings.Replace(value, "MHz", "", 1), 64); err == nil {
|
||||
c.Mhz = t
|
||||
}
|
||||
case "cache size":
|
||||
|
|
Loading…
Reference in New Issue