Complex conditions

8 views
Skip to first unread message

jjoyce

unread,
Oct 8, 2009, 8:53:15 AM10/8/09
to god.rb
hi, hi, hi little drooguies


I have the following scenario:

Delayed job is being monitored by GOD, and sometimes it consumes tons
of memory, so I restart the daemon, and voila, everything back to
normal. Point is I don't want to restart the daemon while it's
executing a task. The task will be forever locked, and will never be
completed. I would like to restart the daemon if the amount of memory
exceeds X Mbytes and process is idle (wich means no task is being
processed).

Is there any chance I can build a restart condition based on the
amount of memory and, at the same time, how much cpu is consuming?

I did it with monit, if memory higher than X, then exec some script
that will check if its idle, if it is, restart it, if it's not, do
nothing.

sorry about the bad english, brazilian monkey typing for help. No
bananas please, just answers.

thanks in advance
Reply all
Reply to author
Forward
0 new messages