0

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

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

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

4

1 回答 1

1

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

于 2012-05-15T17:01:36.620 回答