[Mailman-Users] Monitor qrunner

John Dennis jdennis at redhat.com
Wed May 25 17:44:53 CEST 2005


> Mark Sapiro wrote:
> >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
> >
> >master-qrunner.host.example.com.pid
> >
> >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.

Mark's point about the presence of the file not being a definitive
metric of mailman health should not be ignored. You really have to
ascertain the status of the process. If mailman is abnormally aborting,
which is what started this thread, then there is a high degree of
probably the lock files will be left behind and testing them will give
false positives.

In the Red Hat mailman RPM's we've modified mailmanctl so that it can be
asked the status of the mailman process as an unprivledged user and
return the result as status to the shell as well as printing a message.
Since mailmanctl knows how to locate the process and communicate with
the process via signals it makes mailmanctl the optimal reporter of
status. It was probably an oversight mailmanctl never had this facility.
We have also integrated this with the mailman init.d script so that one
can perform the standard "service mailman status" command. The init.d
script depends on the exit status of "mailmanctl status". These two
changes probably represent a more robust and standard way to determine
status.

I'm attaching our patch for this in case someone finds it useful.

On Wed, 2005-05-25 at 08:13 -0700, Robert Haack wrote:
> What would happen if during the check you told mailman to stop first?  
> Could this mess things up or would it be fine?

Yes you could do that, it is essentially the same thing as "service
mailman restart" if you're running on an OS that supports sysV style
service management.
-- 
John Dennis <jdennis at redhat.com>


More information about the Mailman-Users mailing list