|
From: | Martin Pala |
Subject: | Re: How to monitor processes started from Cron? |
Date: | Sat, 11 Sep 2010 09:53:12 +0200 |
You can set the service monitoring mode to "manual" and enable the service monitoring from the cron script when it starts - i.e. the script will contain line such as this: #script beginning: /usr/bin/monit monitor mycronjob #script body ... #script end: /usr/bin/monit unmonitor mycronjob and the mycronjob settings for monit: check process mycronjob ... stop program = "/usr/bin/killall mycronjob" mode manual if cpu usage > 80% then stop => by default the service is not monitored, the monitoring is enabled/disabled from the cronjob. If the cpu usage exceeds the limit, monit kills the cronjob and disables its monitoring as result of stop action too. Martin On Sep 10, 2010, at 11:07 PM, wam rewam wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |