Supervisor基础
跳到导航
跳到搜索
常识
Supervisor(http://supervisord.org/)是用Python开发的一个client/server服务,是Linux/Unix系统下的一个进程管理工具,不支持Windows系统。它可以很方便的监听、启动、停止、重启一个或多个进程。用Supervisor管理的进程,当一个进程意外被杀死,supervisort监听到进程死后,会自动将它重新拉起,很方便的做到进程自动恢复的功能,不再需要自己写shell脚本来控制
lx
php-worker]# cat supervisord.conf [supervisord] logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB logfile_backups=10 ; # of main logfile backups; 0 means none, default 10 loglevel=debug ; log level; default info; others: debug,warn,trace pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid22 nodaemon=true user=www-data [supervisorctl] [inet_http_server] port = *:9001 #username="yourusername" #password="yourpass" [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [include] files = /var/www/api.sns.cai.com/supervisord.d/production1.*.conf /var/www/apistatistical.cai.com/supervise/production1.*.conf #from laradock tree supervisord.d/ supervisord.d/ ├── laravel-worker.conf.example └── monitor-mail.conf