[Top][All Lists]

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

Re: service config

From: Martin Pala
Subject: Re: service config
Date: Fri, 15 Jul 2011 12:25:14 +0200


please can you provide more details - what exactly doesn't work? The port test is OK - when it won't accept connection, Monit will restart the service. In the case that the program crashed without cleaning the pidfile as you mentioned, it is no problem - the pidfile will contain PID for which no process exists => it will restart the process.

Please check Monit logs - it is likely that when the process crashed, Monit restarted it and thus the port test passed. You can also run Monit in verbose mode with the -v option to see the details.


On Jul 15, 2011, at 11:48 AM, Govind wrote:


I configured a service like this

check process dpm with pidfile /var/run/
group root
start program = "/etc/init.d/dpm start"
stop program = "/etc/init.d/dpm stop"
if 5 restarts within 5 cycles then timeout

I had segfault, which did not clean up the PID file, so i try checking for port like this
if failed port 5015 then restart
if failed port 5015 type tcp then restart

But none of them work,
the dpm service run as
# netstat -tupln|grep dpm
tcp        0      0      *                   LISTEN      8628/dpm       

Can  you please advise, if there was anything wrong in above syntax of port checking.

To unsubscribe:

reply via email to

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