Supervisor控制组内的multiprocs程序

时间:2016-04-04 19:35:28

标签: supervisor

我有这种情况:

  • 组1
    • P1
    • P2
  • P3
  • P4

我的p1有numprocs = 2,如:

numprocs = 2
process_name = '%(program_name)s_%(process_num)02d'

所以我有:

root@28d8dc7bdffd:~# supervisorctl status
group1:'p1_00'                     RUNNING    pid 10442, uptime 0:12:10
group1:'p1_01'                     RUNNING    pid 10433, uptime 0:12:10
group1:p2                          RUNNING    pid 16290, uptime 0:00:07
p3                               RUNNING    pid 633, uptime 0:34:33
p4                               RUNNING    pid 483, uptime 0:35:40

我必须启动/停止/重新启动p1并且它无法正常工作。

我试过了:

root@28d8dc7bdffd:~# supervisorctl stop group1:p1:*
    group1:p1:*: ERROR (no such process)
root@28d8dc7bdffd:~# supervisorctl stop p1:*
    error: <class 'xmlrpclib.Fault'>, <Fault 10: 'BAD_NAME: p1'>: file: /usr/lib/python2.7/xmlrpclib.py line: 794
root@28d8dc7bdffd:~# supervisorctl stop group1:p1*
    group1:p1*: ERROR (no such process)

1 个答案:

答案 0 :(得分:0)

我已经确定了每个工人的全名