我是主管新手。以下是我的主管配置文件。
# -*- conf -*-
[include]
files = *.supervisor
[supervisord]
pidfile = /var/run/supervisord.pid
[supervisorctl]
serverurl = unix://supervisord.sock
[unix_http_server]
file = /var/run/supervisord.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:main]
process_name = main-%(process_num)s
command = /usr/bin/python /home/ubuntu/workspace/rtbopsConfig/rtbServers/rtbTornadoServer/tornadoServer.py --tport %(process_num)s
--port=%(process_num)s
--log_file_prefix=%(here)s/logs/%(program_name)s-%(process_num)s.log
numprocs = 4
numprocs_start = 8050
现在,我需要将过程妖魔化:
1)我可以阻止父母进程和所有孩子
2)开始
3)重新加载所有子进程
4)如果孩子失败则自动重启。
5)这是开始的命令行
supervisord -c /home/ubuntu/workspace/rtbopsConfig/rtb_supervisor/tornadoSupervisor.conf
所以...我使用runit吗?暴发户?
截至目前,我已经杀死了所有父母和孩子的亲戚,如果我这样做,那么就不会重生。
答案 0 :(得分:1)
查看supervisorctl
,它允许您启动/重启/自动启动/停止进程。如果这不符合您的需求,您还可以通过XML-RPC与supervisor
进行通信。