diff --git a/README.rst b/README.rst index 68c133b..a4f57b1 100644 --- a/README.rst +++ b/README.rst @@ -133,6 +133,7 @@ Several methods have been added which are not present in psutil, but will provid - Mhz - CacheSize - Flags (ex: "fpu vme de pse tsc msr pae mce cx8 ...") + - Microcode - load/LoadAvg() (linux, freebsd) @@ -262,6 +263,7 @@ hostname x x x x x CoreID x Cores x x ModelName x x x x x + Microcode x **LoadAvg** Load1 x x x x Load5 x x x x diff --git a/cpu/cpu.go b/cpu/cpu.go index b51e27f..fc2e8d8 100644 --- a/cpu/cpu.go +++ b/cpu/cpu.go @@ -40,6 +40,7 @@ type InfoStat struct { Mhz float64 `json:"mhz"` CacheSize int32 `json:"cacheSize"` Flags []string `json:"flags"` + Microcode string `json:"microcode"` } type lastPercent struct { diff --git a/cpu/cpu_linux.go b/cpu/cpu_linux.go index 3af015a..6bd36cd 100644 --- a/cpu/cpu_linux.go +++ b/cpu/cpu_linux.go @@ -186,6 +186,8 @@ func Info() ([]InfoStat, error) { c.Flags = strings.FieldsFunc(value, func(r rune) bool { return r == ',' || r == ' ' }) + case "microcode": + c.Microcode = value } } if c.CPU >= 0 {