I found the command wmic cpu get LoadPercentage
was recommended as a way to get a CPU load estimate from a command line.
It works as expected from a Windows 10 system:
c:\>wmic cpu get LoadPercentage
LoadPercentage
21
c:\>
From a Windows 2008r2 server, it doesn't return a value:
c:\>wmic cpu get LoadPercentage
LoadPercentage
c:\>
What can be done to allow this to work, or to get the data another way? I tried some of the other approaches in the referenced article and they didn't work either.
You can try with Powershell : How do I find the CPU and RAM usage using PowerShell?
Powershell :
Batch :