diff --git a/cpu/cpu_linux.go b/cpu/cpu_linux.go index 165a34dde..44bf1ce4f 100644 --- a/cpu/cpu_linux.go +++ b/cpu/cpu_linux.go @@ -285,10 +285,6 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) { c.Microcode = value } } - if c.CPU >= 0 { - finishCPUInfo(&c) - ret = append(ret, c) - } if c.VendorID == "ARM" && c.ModelName == "" { if v, err := strconv.ParseUint(c.Model, 0, 16); err == nil { modelName, exist := armModelToModelName[v] @@ -299,6 +295,10 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) { } } } + if c.CPU >= 0 { + finishCPUInfo(&c) + ret = append(ret, c) + } return ret, nil }