Solved

Batch file for CPU Usage

Posted on 2011-02-11
5
2,778 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
moving second domain to new remote site 2 20
Send data from a cell phone to a pc 5 51
Check Disk (CHKDSK) on all volumes and fix if needed. 8 197
how to count files? 4 30
Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
Introduction: I have always been a big fan of Windows but my liking towards it is slowly being eroded by the variety of other Applications that I encounter, when I browse the Web. Most of the software available is free and maybe Open Source too. …
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

807 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