Overview
Supervisor is a client/server system that allows its users to controla number of processes on UNIX-like operating systems. It was inspiredby the following:
Convenience
It is often inconvenient to need to write rc.d scripts for everysingle process instance. rc.d scripts are a greatlowest-common-denominator form of processinitialization/autostart/management, but they can be painful towrite and maintain. Additionally, rc.d scripts cannotautomatically restart a crashed process and many programs do notrestart themselves properly on a crash. Supervisord startsprocesses as its subprocesses, and can be configured toautomatically restart them on a crash. It can also automatically beconfigured to start processes on its own invocation.
Accuracy
It’s often difficult to get accurate up/down status on processes onUNIX. Pidfiles often lie. Supervisord starts processes assubprocesses, so it always knows the true up/down status of itschildren and can be queried conveniently for this data.
Delegation
Users who need to control process state often need only to do that.They don’t want or need full-blown shell access to the machine onwhich the processes are running. Processes which listen on “low”TCP ports often need to be started and restarted as the root user (aUNIX misfeature). It’s usually the case that it’s perfectly fine toallow “normal” people to stop or restart such a process, butproviding them with shell access is often impractical, and providingthem with root access or sudo access is often impossible. It’s also(rightly) difficult to explain to them why this problem exists. Ifsupervisord is started as root, it is possible to allow “normal”users to control such processes without needing to explain theintricacies of the problem to them. Supervisorctl allows a verylimited form of access to the machine, essentially allowing users tosee process status and control supervisord-controlled subprocessesby emitting “stop”, “start”, and “restart” commands from a simpleshell or web UI.
Process Groups
Processes often need to be started and stopped in groups, sometimeseven in a “priority order”. It’s often difficult to explain topeople how to do this. Supervisor allows you to assign prioritiesto processes, and allows user to emit commands via the supervisorctlclient like “start all”, and “restart all”, which starts them in thepreassigned priority order. Additionally, processes can be groupedinto “process groups” and a set of logically related processes canbe stopped and started as a unit.
当前内容版权归 Supervisor 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Supervisor .