[Mailman-Users] Monitor qrunner
msapiro at value.net
Wed May 25 02:04:12 CEST 2005
Jess Mooers wrote:
>So here is my question:
> Is there a way to monitor qrunner to see if it is running?
If it is running, you will find its pid in data/master-qrunner.pid and
there will also be two files in locks/, one named master-qrunner and
containing the line
And the second named master-qrunner.host.example.com.pid and having the
same contents where host.example.com is the actual host name and pid
is the actual pid of the master qrunner process.
Thus there are three files that if present will give you the pid of the
master qrunner. Of course, if it died a horrible death, the files
might be left behind, so you also have to check if the pid is running
and is a mailmanctl process. If the files are missing or the pid
doesn't exist or is not a python process invoked with a mailmanctl
command, then the master qrunner isn't running.
> Is there a way to start it automatically if it is not?
You can test all of that in a fairly simple shell script which will run
bin/mailmanctl -s -q start
if the master isn't running and then execute that shell script every 5
or 10 minutes with cron.
Or you can just run
periodically with cron, but that will generate an error each time it is
done with the master already running.
And don't do
bin/mailmanctl -s start
without testing first or you'll start multiple masters and qrunners.
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users