• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3359
  • Last Modified:

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,
0
sns-emea
Asked:
sns-emea
2 Solutions
 
Frosty555Commented:
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
 
Krzysztof PytkoActive 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
 
pasoloCommented:
Ah Frosty555, you are right
0
 
sns-emeaAuthor Commented:
Thanks for your help guys!
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now