[Twisted-Python] Watching over a Twisted daemon

Nicola Larosa nico at tekNico.net
Tue Aug 12 13:47:10 EDT 2003

Hash: SHA1

I'm using the ProcessMonitor class from t.runner.procmon, with good results,
to start and monitor a few daemons from Twisted. If a daemon goes down, it
is restarted immediately, because the class does not detach from the
daemons' streams.

This unfortunately introduces a single point of failure, because if the
Twisted process goes down, it not only does not monitors the daemons
anymore, but effectively takes them down with it.

It would be nice if Twisted could, via the ProcessMonitor class or
otherwise, monitor long running processes to whose streams it is not connected.

That would even allow one to start a second Twisted instance monitoring the
first, while the first could monitor the second, so that they would
effectively act as the watchdog of each other.

I could try and reimplement the ProcessMonitor class making it use pid
files, the output of the ps command, or even /proc/ directly (non-portable),
but first I would like to know if this is a sound idea, or maybe there are
simpler ways to get this result.

- --
"Finding a pianist who can play the notes is cheap.
Just as finding a programmer who can write code is cheap. [...]
Finding a pianist who is a musician, or finding a coder who is an artist
- - that is a rare and precious find indeed."  Russell, on Slashdot

Nicola Larosa - nico at tekNico.net

Version: GnuPG v1.2.2 (GNU/Linux)


More information about the Twisted-Python mailing list