monitor cpu usage...

Craig A tabmow99 at gmail.com
Mon Dec 15 22:01:16 CET 2008


Hi all,
   I've looked at the documentation, at the mailling lists, and googled
around, and don't explicitly see it so thought i'd try here....

On our system, I've set up nagios and it's monitoring a few things (http,
etc) just fine.   However, one of our applications is giving us grief and
sometimes starts consuming >80% of a cpu (it's a quad-core machine).   So
i'd like to set up a monitor to see how often this happens and to get
notified.   Looking around, it seems like 'check_procs' with the CPU metric
should do what i want.

However, it doesn't seem to behave quite as I'd expect.   If I look at 'top'
on this linux system, for our 'problem' application, i see this (and it will
be constant like this for > 1 hour):
*
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
20022 ourapp   18   0 1428m 1.0g  13m S  104 25.7 442:18.39 java*


So when I run this command, I'd expect to see 1 process flagged:

*[root at ours libexec]# ./check_procs -w 10 -c 20 --metric=CPU
CPU OK: 173 processes
*

I've tried adding the '-u' flag but made no difference.  Is there something
I'm missing if I want to capture and be notified when a process goes above a
certain CPU usuage (ie. 80%)?
Any help or information you could provide would be appreciated.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20081215/38cc79c8/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list