-
Notifications
You must be signed in to change notification settings - Fork 812
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
Windows CPU times can add up to > 100% #653
Comments
We should try if this can be reproduced with psutil, and maybe use psutil to solve that issue. |
At first I thought that it could be related to this issue that was on psutil: (broken windows api where cpu times is sometimes decreasing) but I think that maybe we're not getting PercentUserTime correctly: From msdn doc, I'm a bit worried that on the docs linked PercentIdleTime is described as the 'sample interval that the disk was idle' but it's probably just a typo, given that the basis of the data here report it as the processor Idle time. I'll try correcting the values and see if we get better results |
After checking, it seems that we're getting the points correctly because PercentUserTime and PercentPrivilegedTime always sum up to roughly PercentProcessorTime so they must be a percentage of the total time and there is no need for correction. Reporting system.cpu.idle as |
Should we just switch to psutil to get these metrics on Windows ? How does psutil get them ? |
Psutil calls another system function GetSystemTimes with which it gets kerneltime, usertime and idletime, waits, and then call this function again, which allows him to deduce the percentages of time spent in user mode, system mode and idle mode. Update on using I'll check collecting the value we can with psutils and keeping the wmi solution for system.cpu.interrupt |
👍 |
We're collecting PercentUserTime and PercentIdleTime from Win32_PerfFormattedData_PerfOS_Processor which shouldn't ever add up to more than 100%, but it seems like it does.
Maybe we need to use a different metric other than PercentIdleTime?
The text was updated successfully, but these errors were encountered: