Are Upstart and Supervisord interchangeable? Do they work together? I am looking to run a python program as root when my system (debian) boots. After the boot, I would like the process manager to continue running the program if it crashes. Which would be better suited to do this?
Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.
Design. Upstart operates asynchronously; it handles starting of the tasks and services during boot and stopping them during shutdown, and also supervises the tasks and services while the system is running.
To start supervisorctl, run $BINDIR/supervisorctl. A shell will be presented that will allow you to control the processes that are currently managed by supervisord. Type “help” at the prompt to get information about the supported commands.
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. It shares some of the same goals of programs like launchd, daemontools, and runit. Unlike some of these programs, it is not meant to be run as a substitute for init as “process id 1”.
Upstart was developed as a replacement for the traditional init daemon. Supervisord is a process manager (with a lot of features), but it still needs to be run by an init daemon in itself.
I personally find Upstart is enough for most of my use cases, and from your question I think it will do just fine for you as well.
There are four upstart stanzas that should be of particular interest to you: start on, stop on, respawn and exec. You can read more about them at http://upstart.ubuntu.com/cookbook/.
If you still prefer to go for the Supervisord route this seems like a good thread to get you started - https://serverfault.com/questions/96499/how-to-automatically-start-supervisord-on-linux-ubuntu
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With