Dear All,

 

Please help me, how to show CPU Usage up ?

I need a script to do it, i want to monitor my Server.

 

Best Regards,

Isa

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2

Normally you do not use scripts to monitor things, they usually are executed because of a specified trigger, they are not really meant to run constantly in the background.

To get it thru wmic

WMIC path win32_processor get loadpercentage

here is a couple of links where others have tried the same thing

http://forums.cacti.net/post-9117.html

http://superuser.com/questions/576252/shell-script-that-monitors-cpu-usage-and-terminates-services-with-high-cpu-utili

 

Answered 05/03/2013 by: SMal.tmcc
Red Belt

Please log in to comment

Answers

1

Use a monitoring software like Nagios or Open Manage Essentials? This shows you all you need for all your servers would be the best solution? Both tools are free.

Answered 05/05/2013 by: Nico_K
Red Belt

Please log in to comment
0

I want to look at like on Task Manager.

Answered 05/03/2013 by: isavirtus
Yellow Belt

Please log in to comment
0

A scripted solution would be quite a piece of work and not something that, having done, I personally would give away for free.

Answered 05/03/2013 by: VBScab
Red Belt

  • Thanks you very much, i am really appreciate it if you share your script
  • Er...I said, given the amount of work involved, I *wouldn't* give it away for free. As it turns out, I don't have such a script, as I find the tools which are freely available do the job I want. I'm a H U G E fan of not re-inventing the wheel, as I have more important things to do.
Please log in to comment

  • Hi asman, sorry. I still get error after doing it.
  • Comment-out line 28 which is, I'm sure, where your problem is.

    Having said that, I wouldn't bother. This script monitors one process, not the machine's overall CPU usage. It doesn't produce output anything like Task Manager, either, which is what you requested.
    • I want to look at CPU usage in the percent.
Please log in to comment
0

i have used Open Manage Essentials, well i works fine

Answered 05/06/2013 by: lucifer
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity