[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Monitoring CPU usage always zero?

From: Martin Vernooij
Subject: Monitoring CPU usage always zero?
Date: Wed, 21 Jul 2004 10:41:04 +0200

I have just installed Monit 4.3 on a Redhat 7.2 linux box.
Reason: apache processes are regularly eating all my CPU power. I
already upgrade apache to 1.3.31 but that doesn't solve it. So I thought
of monitoring apache and restarting when it eats all cpu.

I'v set the config to:

check process apache
    with pidfile "/usr/local/apache/logs/"
    group www
    start program = "/usr/local/apache/bin/apachectl start"
    stop program = "/usr/local/apache/bin/apachectl stop; sleep 5"
#    if 2 restarts within 3 cycles then timeout
    if cpu is greater than 90% for 3 cycles then exec "apache_restart"
#    if failed port 80 protocol http then exec "apache_restart"
#    if children > 30 for 5 cycles then stop

Verifying the apache monitoring most of the times show 0% CPU usage,
sometimes an ridiculous value of 500% or even 5000%. I turned on
debugging, set the polling to 2 seconds and I get in my errorlog always
0% CPU for apache.

During testing I had a small script running, doing wget's of webpages on
this server, and 'top' showed 0% idle and around 10 httpd processes
eating all cpu. I can't find why monit sees 0% CPU and I'm sure the
server is fully loaded by httpd process. Any suggestions?

Thanks, Martin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]