Batch file for CPU Usage

Hi Experts,

I am trying to create a batch file which would give me the current Total CPU Usage on the command line.
Does anyone know the command which calculates the current Total CPU Usage?

Thanks,
sns-emeaAsked:
Who is Participating?
 
Krzysztof PytkoConnect With a Mentor Senior Active Directory EngineerCommented:
Have you tried with:

 
wmic cpu get LoadPercentage

Open in new window

on that OS or

 
wmic /node:<RemoteHostName> cpu get LoadPercentage

Open in new window

for remote servers/hosts
?

Regards,
Krzysztof
0
 
Frosty555Connect With a Mentor Commented:
Look into using the LOGMAN command, it will allow you to query the performance counters on the system to retrieve various performance information, such as average cpu % time.

http://technet.microsoft.com/en-us/library/cc753820%28WS.10%29.aspx
0
 
pasoloCommented:
With a scipting language can be done, not from a regular batch file unless you call the script from the batch file.
0
 
pasoloCommented:
Ah Frosty555, you are right
0
 
sns-emeaAuthor Commented:
Thanks for your help guys!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.