Search code examples
windowsbatch-filecpuwmic

How to interpret WMIC command output for CPU utilization?


When I ran below command to get overall server CPU utilization 2 times in a row, it showed 28% and 99%.
I checked both times in Task Manager - Performance/Processes and found that in processes tab 99% CPU was used by "system idle processes".

wmic cpu get LoadPercentage /value

Now the questions are:

  1. Does above wmic command show CPU utilization with also including idle processes usage?
    If that is the case then why it didn't show 99% when I checked 1st time?
    I can still see idle processes using 99% CPU?
  2. Why did it show 99% CPU 2nd time while all the CPU was used by idle processes only?

Solution

  • Idle process is not counted towards total load or else it would have to report always 99%. If all your programs need 50% of your CPU the other 50% are occupied by the idle process. There was probably another program running or initializing wmic put load on the CPU.