Solved

Batch file for CPU Usage

Posted on 2011-02-11
5
2,686 Views
Last Modified: 2012-08-13
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
Comment
Question by:sns-emea
5 Comments
 
LVL 31

Assisted Solution

by:Frosty555
Frosty555 earned 50 total points
ID: 34869807
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
 
LVL 3

Expert Comment

by:pasolo
ID: 34869826
With a scipting language can be done, not from a regular batch file unless you call the script from the batch file.
0
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 200 total points
ID: 34869833
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
 
LVL 3

Expert Comment

by:pasolo
ID: 34869840
Ah Frosty555, you are right
0
 

Author Comment

by:sns-emea
ID: 34870897
Thanks for your help guys!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now