[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Batch file for CPU Usage

Posted on 2011-02-11
5
Medium Priority
?
3,101 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 31

Assisted Solution

by:Frosty555
Frosty555 earned 200 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 800 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

656 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