Page 1 of 1

CPU Usage detail

Posted: Fri Aug 17, 2012 3:55 pm
by rex007can
I am monitoring some servers with Nagios on CentOS and NSCA++ on Windows.

Everything is okay, except I have a "misbehaving" server that occasionally tops out a 99% CPU for a few hours during the night.
I get the nagios warnings about CPU usage, but is there a way to monitor which service on the server is using all the CPU?

Is there a check, using NSCA++ or NC_NET or anything else that would send me a warning that "Process XXX is taking 50% of the CPU for XX Minutes"?

I havent been able to figure that out.


Thanks.

Re: CPU Usage detail

Posted: Mon Aug 20, 2012 10:09 am
by yancy
rex007can,

You can monitor the cpu usage of a specific process using WMI which doen't require any agent be installed.

for example:

Check CPU utilisation for some SQL server processes, warn if utilisation is more than 10% or if there are more than 2 processes
Command:

check_wmi_plus.pl -H HOST -u USER -p PASS -m checkproc -s cpu -a %sql% -w 10 -w _ItemCount=2

Output : OK (Sample Period 59 sec) - Found 1 Instance(s) of "%sql%" running. CPU_sqlservr(PID=2220)=0.0% |'Process Count'=1;2; 'Avg Utilisation CPU_sqlservr'=0.0%;10;

The WMI wizard can be found here:
http://exchange.nagios.org/directory/Ad ... rd/details



alternatively,

If you want to use NSClient++, you could use an external plugin such as:

[/url]http://exchange.nagios.org/directory/Pl ... TK/details [url]

Regards,

-Yancy