monit-general
[Top][All Lists]
Advanced

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

Re: how exec a command


From: Martin Pala
Subject: Re: how exec a command
Date: Wed, 12 Nov 2014 18:07:19 +0100

Hi,

check the logs to see if the apache cpu test matched. Note that apache usually 
uses fork process model and the real work is done by apache children => you may 
need to use the total cpu test:

        if total cpu > 1% for 2 cycles then exec "/bin/bash -c 'top -bn1 | mail 
-s top address@hidden'"

Regards,
Martin


You can run monit in debug mode (using -v option) to trace the tests ... 

> On 12 Nov 2014, at 18:00, Pol Hallen <address@hidden> wrote:
> 
> Hi Martin, thanks for your reply :-)
> 
> so using:
> 
>> if cpu > 1% for 2 cycles then exec "/bin/bash -c 'top -bn1 | mail -s top
> address@hidden'"
> 
> does not run (within apache) although using same (for example) to check
> percentage of disk:
> 
> if cpu > 1% then exec "/bin/bash -c 'top -bn1 | mail -s top
> address@hidden'"
> 
> runs!
> 
> how investigate about that problem? are "for 2 cycles" a problem?
> 
> thanks
> 
> Pol
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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