Herramientas de usuario

Herramientas del sitio


wiki2:supervisor

¡Esta es una revisión vieja del documento!


Supervisor

Basics

Install

sudo apt-get install supervisor 

Configure

In path /etc/supervisor/supervisord.conf we can configure it for any user:

[unix_http_server]
;file=/var/run/supervisor.sock ; (the path to the socket file)
file=/tmp/supervisor.sock ; (the path to the socket file)
chmod=0777 ; sockef file mode (default 0700)

Start\Stop the service

$ service supervisor stop
$ service supervisor start

Management

  • supervisorctl status
  • supervisorctl start process
  • supervisorctl stop process

Adding programs

Add a configuration file with a content similar to:

[program:cat]
command=/bin/cat
process_name=%(program_name)s
numprocs=1
directory=/tmp
umask=022
priority=999
autostart=true
autorestart=true
startsecs=10
startretries=3
exitcodes=0,2
stopsignal=TERM
stopwaitsecs=10
user=chrism
redirect_stderr=false
stdout_logfile=/a/path
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/a/path
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
environment=A="1",B="2"
serverurl=AUTO

After adding a program

$ supervisorctl reread
$ supervisorctl update
wiki2/supervisor.1431003629.txt.gz · Última modificación: 2020/05/09 09:25 (editor externo)