Closed yakuter closed 1 year ago
I am unable to confirm this using AIX's actual machine. However, cpu.Times()
returns the "number of CPUs consumed at the moment" based on the Linux definition. Therefore, I think using perfstat.CpuUtilTotalStat()
is correct.
Also, when percpu
is true, perfstat.CpuStat()
is used, which does not wait one second. Wouldn't we get different meanings when percpu
is true and false?
I am not familiar with AIX so sorry if I am wrong.
Hi @shirou thank you for the comment. There is no function called CpuUtilTotalStat in the project. I think it is already a typo. So it should be either CpuUtilStat or CpuTotalStat. As long as I get the CPU info in AIX rıght, they are all OK for me :)
Hmm, it seems CpuUtilTotalStat
is defined here. And also I can build with GOOS=aix GOARCH=ppc64
.
Ohh I searched in the wrong project, you are right. Thank you @shirou , that should be great 🙏
I am closing this PR. If you have another issue, please feel free to reopen it. Thank you for using gopsutil.
This PR fixes a bug (wrong function name) in the AIX support of the CPU package.