List Info

Thread: Watching daemons




Watching daemons
user name
2006-07-28 14:39:12
Hello,

currently I have a problem with my server that makes
ftp-proxy die
unexpectedly. I'm in the process of tracking this down,
which is
likely something hardware related AFAIK.

In the mean time, I'd like to keep ftp-proxy running most
of the time.
What do you guys use/recommend to watch if a process dies
and restart
it?

Thanks,
Carlos.
-- 
<nick> grah windows just crashed again, unstable crap.
<yukito> Windows isn't unstable, it's just
spontaneous.

Watching daemons
user name
2006-07-28 16:30:27
Hi Carlos,

> What do you guys use/recommend to watch if a process
dies and restart
> it?

monit:
http://www.tildeslas
h.com/monit/

/usr/ports/sysutils/monit/

HTH... Nico

Watching daemons
user name
2006-07-28 17:02:02
On 7/28/06, Carlos A. Carnero Delgado <carloscarnerogmail.com> wrote:
> In the mean time, I'd like to keep ftp-proxy running
most of the time.
> What do you guys use/recommend to watch if a process
dies and restart
> it?

More to the root of the problem, have you turned on verbose
debugging
output to see if there are any correlations to when it dies?
 Are any
other processes dying unexpectedly?  Try passing an
additional flag
'-D 7' and watch the logs.

As a nasty interim hack, and a suggested last resort, you
might use a
cron job to restart it when it dies (for now) -- it won't
be
immediate, but you could check at 1 minute intervals.

Per minute PID check and restart in root's crontab (ugly):
* * * * * /usr/bin/pgrep ftp-proxy 2>&1 >/dev/null
|| /usr/sbin/ftp-proxy

Watching daemons
user name
2006-07-28 18:42:08
On Fri, Jul 28, 2006 at 10:38:49AM -0400, Carlos A. Carnero
Delgado wrote:
> In the mean time, I'd like to keep ftp-proxy running
most of the time.
> What do you guys use/recommend to watch if a process
dies and restart
> it?

I would use daemontools[1] or runit[2].  There's also
freedt in ports, 
but I've not tried it.

[1] http://cr.yp.to/daem
ontools.html
[2] http://smarden.sunsi
te.dk/runit/

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )