monit-general
[Top][All Lists]
Advanced

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

restart program


From: Marshal Newrock
Subject: restart program
Date: Wed, 7 Feb 2007 10:27:28 -0500

Are there any plans to add support for "restart program"?  Some distros
are more tolerant in the restart action than the stop/start action.

For example, I am using Gentoo, and saw this morning that one of the
programs failed (it is being checked by tcp port as well as pid).  In
the logs I see:

Feb  7 07:26:29 mailtemp monit[32170]: 'policyd' process is not running
Feb  7 07:26:29 mailtemp monit[32170]: 'policyd' trying to restart
Feb  7 07:26:29 mailtemp monit[32170]: 'policyd'
start: /etc/init.d/policyd
Feb  7 07:26:30 mailtemp rc-scripts: WARNING:  policyd has already been
started.

Gentoo keeps track of programs that have been started through the init
scripts. If you attempt to start one that has already been started, it
will immediately fail.  It's possible to have a situation where you
can't "stop" a program because it's not running, and thus can't "start"
the program because it's already started.  In cases like these,
"restart" will often work.

Gentoo also provides "zap" to reset a service to stopped in its cache,
but that's probably a bit more than monit can be expected to address.

As a side note, I think it would be useful for monit to log the full
command used to start or stop a program.

-- 
Marshal Newrock, Ideal Solution LLC
http://www.idealso.com




reply via email to

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