monit-general
[Top][All Lists]
Advanced

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

Re: start and stop process by monit


From: Christian Hopp
Subject: Re: start and stop process by monit
Date: Tue, 7 Oct 2003 08:47:51 +0200 (CEST)

On Tue, 7 Oct 2003, Jan-Henrik Haukeland wrote:

> Jan-Henrik Haukeland <address@hidden> writes:
>
> > If you really want to make sure that a process was stopped, you can in
> > the stop program or in the script monit calls to stop the process, add
> > code that kills the process with SIGKILL if graceful termination did
> > not succeed. (Of course, this could instead be implemented in monit,
> > i.e. if monit failed to stop a process it sends SIGKILL to the process
> > as it's final action, but I think this decision should be done in the
> > stop program monit calls and not by monit).
>
> On second thought, maybe monit *should* send a process the SIGKILL
> signal as its last action if the process wont stop after monit called
> the stop program for the process. What do others think?

I don't think so... if monit is not asked to SIGKILL the process,
monit shouldn't do so.  Maybe it is sometime supposed to take longer,
e.g. sophisticated syncing processes at the end.  Anyways, you can
still write...

stop program = "/etc/init.d/foo stop; kill -KILL $MONIT_PROCESS_PID"

Christian

-- 
Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf.   fax: +49-5323-72-3197
                             pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/





reply via email to

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