Supervisor 配置

某个python脚本,希望有个程序可以监控,并且在down掉以后重启,发现了 supervisor

 

配置如下:

[supervisord]
logfile=/home/melon/samba/comstat/log/supervisord.log    ; supervisord log file
logfile_maxbytes=50MB                           ; maximum size of logfile before rotation
logfile_backups=10                              ; number of backed up logfiles
loglevel=error                                  ; info, debug, warn, trace
pidfile=/home/melon/samba/comstat/run/supervisord.pid                ; pidfile location
nodaemon=false                                  ; run supervisord as a daemon
minfds=1024                                     ; number of startup file descriptors
minprocs=200                                    ; number of process descriptors
user=root                                     ; default user
childlogdir=/home/melon/samba/comstat/log
[program:stat]
directory=/home/melon/samba/commands
command=/home/melon/samba/commands/stat.py
autostart=true
srartsecs=10
autorestart=true
redirect_stderr=true

 启用 :bin/supervisord -c etc/supervisord.ini

你可能感兴趣的:(super)