Martin,

Thanks for the reply and I now see the 'Total Memory Usage (incl. children)'
on the detail page for the Apache process.  It's a bit confusing because the
top line of the main page shows total memory used, but when you add up the
memory displayed on that page for each process it doesn't add up.

Are there any plans or is there any possibility for the main page to show
'Total Memory Usage (incl. children)'?  I also just noticed that CPU usage
is reported the same way.  The main page only shows CPU for the single
process, but the detail page shows 'Total CPU Usage (incl. children)'.

If you have a wishlist, I'd like to add the Total Memory Usage (incl.
children) and Total CPU Usage (incl. children) on the main page.  Maybe have
this as an option in the config file so you can do something like this:

check process Apache with pidfile /var/run/apache2.pid
   group www
   show totalmem
   show totalcpu
   start program = "/etc/init.d/apache2 start"
   stop program  = "/etc/init.d/apache2 stop"
   if totalcpu > 60% for 2 cycles then alert
   if totalcpu > 80% for 5 cycles then restart
   if totalmem > 500 MB for 5 cycles then restart
   if children > 250 then restart
   if loadavg(5min) greater than 10 for 8 cycles then restart
   if 3 restarts within 5 cycles then timeout

Thanks!!!

Darhl

On Mon, Aug 29, 2011 at 12:40 PM, Martin Pala <[email protected]>wrote:

> Hi,
>
> sorry for long delay.
>
> The configuration and the reported values are OK … the problem is simple -
> the attached snapshot of the Monit httpd interface report is from the main
> page (overview) which doesn't show the total memory usage, but only the
> memory usage of the process itself … in your case it matches the 'ps aux'
> output for the parent apache process with PID 24120 (10692kB => 0.6%). To
> display the total memory usage (including children) you need to click on the
> "Apache" link which will open details for the process and the total memory
> will be displayed in the table row with the title "Total memory usage (incl.
> children)".
>
> Regards,
> Martin
>
>
>
> On Aug 24, 2011, at 3:09 PM, Darhl Thomason wrote:
>
> Hi Martin,
>
> Wondering if you had any suggestions for me...
>
> Thanks!
>
> Darhl
>
> On Fri, Aug 19, 2011 at 11:27 AM, Darhl Thomason <[email protected]> wrote:
>
>> Hi Martin,
>>
>> Sorry for the delay.  Apache portion of monitrc below:
>>
>> check process Apache with pidfile /var/run/apache2.pid
>>    group www
>>    start program = "/etc/init.d/apache2 start"
>>    stop program  = "/etc/init.d/apache2 stop"
>>    if totalcpu > 60% for 2 cycles then alert
>>    if totalcpu > 80% for 5 cycles then restart
>>    if totalmem > 500 MB for 5 cycles then restart
>>    if children > 250 then restart
>>    if loadavg(5min) greater than 10 for 8 cycles then restart
>>    if 3 restarts within 5 cycles then timeout
>>
>>
>>
>>
>>
>> On Sat, Aug 13, 2011 at 7:52 AM, Martin Pala <[email protected]>wrote:
>>
>>>  Please can you post your monit configuration for apache service?
>>>
>>> If you're using the pidfile based monitoring, the pidfile should contain
>>> the pid of the apache master process which is parent to all apache childs.
>>> Monit then summarizes the memory of all its childs.
>>>
>>> If you're using the pattern matching process monitoring and multiple
>>> processes match the pattern, then monit checks only the first matching
>>> process - if this process is child, then it wont see the total memory usage
>>> of the sibblings.
>>>
>>> Regards,
>>> Martin
>>>
>>>
>>>
>>>   On Aug 10, 2011, at 8:20 PM, Darhl Thomason wrote:
>>>
>>>   I'm using Monit 5.2.5 running on Debian Squeeze
>>>
>>> When I look at my Monit web portal I see items similar to this:
>>>
>>>   Apache <http://localhost:85/Apache> running 9d 3h 27m  0.0% 0.6%
>>> [10692 kB]
>>> But when I do 'ps aux | grep apache' I get:
>>> root@mail:/# ps aux | grep apache
>>> www-data  2009  0.0  0.8  44528 13404 ?        S    Aug09   0:22
>>> /usr/sbin/apache2 -k start
>>> www-data  4941  0.0  0.8  44524 13248 ?        S    Aug09   0:07
>>> /usr/sbin/apache2 -k start
>>> root      5194  0.0  0.0   3300   740 pts/1    S+   11:11   0:00 grep
>>> apache
>>> www-data  5733  0.0  0.8  44524 13096 ?        S    Aug09   0:18
>>> /usr/sbin/apache2 -k start
>>> www-data  8829  0.0  0.8  44524 13108 ?        S    Aug09   0:16
>>> /usr/sbin/apache2 -k start
>>> www-data  9411  0.0  0.8  44524 13112 ?        S    Aug09   0:15
>>> /usr/sbin/apache2 -k start
>>> www-data  9423  0.0  0.8  44524 13104 ?        S    Aug09   0:28
>>> /usr/sbin/apache2 -k start
>>> www-data 13388  0.0  0.8  44256 12500 ?        S    06:05   0:01
>>> /usr/sbin/apache2 -k start
>>> www-data 13484  0.0  0.8  44524 12940 ?        S    06:06   0:00
>>> /usr/sbin/apache2 -k start
>>> www-data 17911  0.0  0.3  38296  5736 ?        S    06:22   0:00
>>> /usr/sbin/apache2 -k start
>>> www-data 22802  0.0  0.8  44524 13120 ?        S    Aug09   0:10
>>> /usr/sbin/apache2 -k start
>>> root     24120  0.0  0.6  38160 10692 ?        Ss   Aug01   1:08
>>> /usr/sbin/apache2 -k start
>>>
>>> it adds up to 8.1% memory.  Why is it only reporting 0.6% Memory?
>>>
>>> There are other/similar items examples Amavis, Spamassassin, etc.
>>>
>>> Thanks!
>>>
>>> Darhl
>>>
>>> --
>>> To unsubscribe:
>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>>
>>>
>>>
>>> --
>>> To unsubscribe:
>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>>
>>
>>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to