Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm use wmic command to get current CPU utilization, the command are:

wmic cpu get LoadPercentage /value

It's works fine at first, but somehow it doesn't shows the LoadPercentage, but always returns with empty result like:

C:\Users\Administrator>wmic cpu get LoadPercentage /value
LoadPercentage=

It's so weird and I'm pretty sure that the result don't match with the taskmgr.exe. I also tried this command without /value, the result is still the same.

I have copy a large file in my server, and the CPU usage in TaskManager and wmic is like:

no matter what value is in TaskManager, the wmic always return empty value.

It seems this happen when the percentage is zero, that is, it show LoadPercentage= instead of LoadPercentage=0 – Aacini Jul 1, 2014 at 10:20 No, my system's CPU load is not zero and I have monitored the TaskManager, it's CPU load is not match with wmic's result. – leeyiw Jul 2, 2014 at 1:15 I believe Aacini is correct. I was able to get LoadPercentage= once out of ~30 tries on my PC. I also occasionally see CPU usage of 0% in task manager. The value is transient and variable, so trying to match WMIC value with task manager seems impossible. – dbenham Jul 2, 2014 at 11:58

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.