超级用户,监管员 Supervisor 超级用户是一个负责管理和维护网络的用户,这个术语在NetWare网上有特殊的含义,超级用户对所有的文件卷宗、目录和文件有完全的访问权限,下面我们来看一个Supervisor进程管理.
功能,优点,配置简单,管理精准,进程组管理,RPC扩展,API支持,FastCGI进程管理,事件支持(如定时任务)
缺点:被管理进程必须前台运行,退出后会使被监管的进程也退出.
配置:
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[supervisord]
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[program:cow]
command=/web/root/bin/cow -rc="/web/root/etc/cow.conf"
autostart=true
autorestart=true
redirect_stderr=true
stderr_logfile=NONE
--phpfensi.com
[include]
files = /etc/supervisor/conf.d/*.conf
操作:
supervisorctl status 查看进程状态
supervisorctl reload 重启supervisord
supervisorctl start|stop|restart 启动关闭重启进程。
大型站长资讯类网站! https://www.nzzz.com.cn