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

Information related to Model, Family and VendorID are unavailable for POWER9 and above. #1494

Closed
1 of 5 tasks
kishen-v opened this issue Jul 25, 2023 · 0 comments · Fixed by #1495
Closed
1 of 5 tasks

Comments

@kishen-v
Copy link
Contributor

kishen-v commented Jul 25, 2023

Bug Description
The fields which contain information related to model, family and VendorID are unavailable for POWER9 and above generations of processors. The following is the output observed when cpu.Info() is executed.

[{"cpu":0,"vendorId":"","family":"","model":"","stepping":2,"physicalId":"","coreId":"0","cores":1,"modelName":"POWER9 (architected), altivec supported","mhz":2500,"cacheSize":0,"flags":null,"microcode":""} }

Expected behavior
The expected behaviour is to have the fields related to model, family and vendor ID to be set for POWER9 and above.

[{"cpu":0,"vendorId":"IBM","family":"POWER","model":"POWER9","stepping":2,"physicalId":"","coreId":"0","cores":1,"modelName":"POWER9 (architected), altivec supported","mhz":2500,"cacheSize":0,"flags":null,"microcode":""}]

The following lines is where the change needs to be made.

gopsutil/cpu/cpu_linux.go

Lines 260 to 263 in c43eaea

case "Model Name", "model name", "cpu":
c.ModelName = value
if strings.Contains(value, "POWER8") ||
strings.Contains(value, "POWER7") {

Environment (please complete the following information):

  • Windows: [paste the result of ver]
  • Linux: [paste contents of /etc/os-release and the result of uname -a]
[root@node-test ~]# uname -a
Linux node-test.power-iaas.cloud.ibm.com 4.18.0-408.el8.ppc64le #1 SMP Mon Jul 18 16:06:55 UTC 2022 ppc64le ppc64le ppc64le GNU/Linux
[root@node-test gops]# lscpu
Architecture:        ppc64le
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  8
Core(s) per socket:  1
Socket(s):           1
NUMA node(s):        1
Model:               2.2 (pvr 004e 0202)
Model name:          POWER9 (architected), altivec supported
  • Mac OS: [paste the result of sw_vers and uname -a
  • FreeBSD: [paste the result of freebsd-version -k -r -u and uname -a]
  • OpenBSD: [paste the result of uname -a]

Additional context
None.

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

Successfully merging a pull request may close this issue.

1 participant