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

Windows - psutil.test() cpu_percent = 0 #983

Closed
ladislashornok opened this issue Feb 28, 2017 · 1 comment
Closed

Windows - psutil.test() cpu_percent = 0 #983

ladislashornok opened this issue Feb 28, 2017 · 1 comment

Comments

@ladislashornok
Copy link

Hi,

When I use psutil.test() in a windows cmd :

python -c "import psutil; psutil.test()"

the cpu_percent is always equal to zero.

If a start python :

import psutil
psutil.test()

Then the cpu_percent values are right.

Python 2.7.10 / psutil version 5.1.3 / tested on Windows 10 and Windows 2008 R2 Standard

Thanks.

@giampaolo
Copy link
Owner

Yes, the CPU column is irrelevant (always shows 0%) because in order to get a meaningful value cpu_percent method would need more time. I added it in order to emulate ps command, which also shows a CPU% column of 0%. It probably makes sense to remove it.

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

No branches or pull requests

2 participants