By Alister West
Many ways to do this :)
UBIC - Perl
Ubic is a user-space process monitor.
It has pluggable backends - many distributed on CPAN (ie. Ubic::Service::Starman).
- sets up ~/.ubic.cfg
- adds crontab entry: ubic-watchdog ubic.watchdog
ubic start ubic.watchdog
- starts service
- adds file ~/services/data/status/ubic.watchdog -
Monit - C
http://mmonit.com/ - fast and simple but with a limited configuration syntax.
GOD - Ruby
http://godrb.com/ - gets a lot of press and is easy to configure but there are
reports of memory leaks.
Linux - Other
Linux-Server-Base (LSB) type runlevel scripts (usually put into /etc/init.d/)
are falling out of fashion. Here is a short list.
- daemontools with supervise (svc).
Requires fg mode and sig handling by app. Uses /var/services, /services
- upstart with respawn option.
- restartd Uses /proc/$service/
- launchd OSX launcher
- runit with sv (runsv)
gentoo runlevel control - no process monitoring. rc-update, rc-status
- Daemon::Control - perl module which can turn any process/daemon into a LSB script