[Top][All Lists]

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

(Repost) How to monitor processes started from Cron?

From: wam rewam
Subject: (Repost) How to monitor processes started from Cron?
Date: Fri, 10 Sep 2010 22:07:12 +0100

Hi! (sorry if I have been posting twice - I got an error message the first time)

I am starting some processes at specific times using Cron. I would like to monitor them using Monit, but just to kill them if they are using too much resources. I do not want Monit to start or restart them, and I would need Monit to be "fine" with the fact that they are not running all the time.

I found a way to do it by only specifying a stop method, and not a start one for these processes. Monit does "try" to start them but it fails (and this is fine), and it does kill the processes as per my resources criteria. So it kind of works. But I have the following problems:

- my log file becomes huge and impossible to read: it is full of "error: XX process is not running" and "error: monit: Start or stop method not defined -- XX"

- if Monit stops one of these processes (when resource limits are exceeded), it also stops monitoring them... whereas I would need it to be "ready" to monitor for next time the process is started from Cron.

Is there a better way to monitor such Cron-started processes?

Thanks a lot!

reply via email to

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