Python 主管新手-如何使守护进程正常工作

Python 主管新手-如何使守护进程正常工作,python,ubuntu,supervisord,Python,Ubuntu,Supervisord,我是新来的主管。下面是我的主管配置文件 # -*- 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] s

我是新来的主管。下面是我的主管配置文件

# -*- 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吗?暴发户


到现在为止,我已经杀死了所有的父母和孩子,如果我这样做了,他们就不会重生

查看一下
supervisortl
,它允许您启动/重新启动/自动启动/停止进程。如果这不符合您的需要,您还可以通过XML-RPC与
主管
进行沟通。

我没有取消声明和主管CTL。例如,如何停止使用stop all using supervisorctl?请参阅文档
supervisorctl stop all