Weblog entry #24 for lee
We have a process running on a new server that's leaking memory and then crashing. Tracking this down is on the TODO list, but to prevent myself from getting more alerts in the middle of the night I needed to install something that would respawn the job.
Previous servers here have daemontools installed (which needs a multi step install process on deb systems: installing daemontools-installer, building the package, installing the freshly built package). I went ahead and built the package.
I then had a mild panic attack when installation failed because /etc/inittab was missing. Traditionally, on Unix systems, /etc/inittab is one of those files you're especially careful with - it's the configuration of init, pid 1.
This server was in fact the first server I'd dealt with running Ubuntu Edgy Eft. And Edgy is the first release to use Upstart as an init replacement, and upstart doesn't use /etc/inittab.
deamontools can be made to install by running
touch /etc/inittabbeforehand, which results in the following being written out
SV:123456:respawn:/command/svscanboot
Then, to get the job to work with upstart, you need to create the file /etc/event.d/daemontools with the following
# daemontools - svscanboot # # runs in all levels # start on runlevel-2 start on runlevel-3 start on runlevel-4 start on runlevel-5 stop on shutdown respawn /command/svscanboot
This may be a redundant use of daemontools, since I suspect the functionallity that we're using is already available in upstart. However, since we only have one system at the moment using upstart and it still seems to be undergoing initial development, we probably won't be switching over all of our jobs until upstart is available in (at least) an Ubuntu Long-Term-Support release.
Comments on this Entry
# svscan - daemontools
#
# This service starts daemontools from the point the system is
# started until it is shut down again.
start on runlevel-1
start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5
start on runlevel-6
stop on shutdown
exec /command/svscanboot
respawn
[ Parent | Reply to this comment ]