Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 482 by
bharathi...@gmail.com: get_cpu_percent returns incorrect
data
http://code.google.com/p/psutil/issues/detail?id=482
What steps will reproduce the problem?
Using the get_cpu_percent returns an 100% value.
What is the expected output?
Expected as per the task manager CPU usage value
What do you see instead?
100% instead of other values like 30% or 40%
What version of psutil are you using? What Python version?
psutil 1.2.1 and python 2.7 32bit version on 64bit machine
On what operating system? Is it 32bit or 64bit version?
Windows 7 64 bit but using the 32bit version on 64bit
Please provide any additional information below.
The purpose is, I am using the get_cpu_percent to get the cpu usage of the
pythonw.exe process when the particular function is called.
A simple snippet:
process.get_cpu_percent(interval=1)
SDKTestSuite.DijSDK_CalculateFps(int(timeForFPS),int(index),cameraName)
cpuUsage = process.get_cpu_percent(interval=0)
This is the exact code which I am using in my project. The call to
DijSDK_CalculateFps does some project related task. Now the thing we need
to find out how much percentage of CPU ahas been used by this call.
Sometimes the value for cpuUsage is 100%. When we compare the CPU usage
percentage with the task manager data, it is not comparable. For example if
the task manager value is 10% it returns a value around 40-50% which is not
expected.
Can you tell me, Am I using the correct function to get this value or how
to use this function to get the value approximate to the task manager data.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings