gopsutil
gopsutil copied to clipboard
cpu Mhz with current, max and min.
Is your feature request related to a problem? Please describe. psutils from python, mas current, max and min.
Describe the solution you'd like extend "Mhz" struct, with this 3 values.
Describe alternatives you've considered Extend the InfoStat like this.
type InfoStat struct {
CPU int32 `json:"cpu"`
VendorID string `json:"vendorId"`
Family string `json:"family"`
Model string `json:"model"`
Stepping int32 `json:"stepping"`
PhysicalID string `json:"physicalId"`
CoreID string `json:"coreId"`
Cores int32 `json:"cores"`
ModelName string `json:"modelName"`
Mhz Mhz `json:"mhz"`
CacheSize int32 `json:"cacheSize"`
Flags []string `json:"flags"`
Microcode string `json:"microcode"`
}
type Mhz struct {
current float64 `json:"current"` //from cpuinfo or cpufreq/cpuinfo_cur_freq
max float64 `json:"max"` //from cpufreq/cpuinfo_max_freq
min float64 `json:"min"` //from cpufreq/cpuinfo_min_freq
}
Additional context If i can do a PR, i do. The only problem, is that i only has linux to test.