monit-general
[Top][All Lists]
Advanced

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

RE: Monitoring CPU usage always zero?


From: Ugo Bellavance
Subject: RE: Monitoring CPU usage always zero?
Date: Wed, 21 Jul 2004 09:07:57 -0400

Hi,

See inline

>-----Message d'origine-----
>De : Martin Vernooij [mailto:address@hidden
>Envoyé : 21 juillet, 2004 04:41
>À : address@hidden
>Objet : Monitoring CPU usage always zero?
>
>
>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/httpd.pid"
>    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?

Could it be because monit would be monitoring the parent httpd (run by root), 
who forks into childs (run by nobody or apache)?  The parent httpd effectively 
doesn't use much cpu.  The childs are working hard :).

>
>
>Thanks, Martin
>
>
>
>
>
>--
>To unsubscribe:
>http://lists.nongnu.org/mailman/listinfo/monit-general
>




reply via email to

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