[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit] start starts before stop stops
From: |
monitml |
Subject: |
[monit] start starts before stop stops |
Date: |
Wed, 27 Jan 2010 16:39:00 -0800 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100125 Shredder/3.0.2pre |
Not sure if this has been reported before, but with 5.0.3 if I do:
monit restart x
then the start for x in the log starts before the stop stops (the stop end
time is not recorded in the log, unfortunately).
I tested by making stop something like:
#!/bin/sh +x
/bin/date
/usr/bin/killall java
/bin/date
/bin/sleep 3
/bin/date
/usr/bin/killall -9 java
...clean/remove some work files...
...grab a fresh copy of work files...
/bin/date
The problem is monit starts start before I get to even the killall -9
statement in the stop script.
I believe I understand the problem - monit immediately starts checking if the
pid is still alive after it starts the stop script, then as soon as that pid
is gone it starts the start script without waiting for the stop script to stop.
But I have to do some clean up after the process is dead (and I can't do it
until the process is dead) and I don't want monit starting the start script
until the stop script has stopped or a reasonable (settable?) timeout.
Does that make sense?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [monit] start starts before stop stops,
monitml <=