Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Upstart and Supervisord? [closed]

Tags:

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?

like image 557
Alexis Avatar asked Nov 30 '12 00:11

Alexis


People also ask

What is Ubuntu Upstart mode?

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.

How does upstart work Linux?

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.

How do I start Supervisorctl?

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.

What is supervisor in Python?

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”.


1 Answers

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

like image 147
Erik Näslund Avatar answered Nov 12 '22 01:11

Erik Näslund