Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu Mhz with current, max and min. #1516

Open
alexwbaule opened this issue Aug 28, 2023 · 0 comments
Open

cpu Mhz with current, max and min. #1516

alexwbaule opened this issue Aug 28, 2023 · 0 comments

Comments

@alexwbaule
Copy link

alexwbaule commented Aug 28, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant