supervisord supports process groups. You can group processes into named groups and manage them collectively.
[unix_http_server]
file=%(here)s/supervisor.sock
[supervisord]
logfile=supervisord.log
pidfile=supervisord.pid
[program:cat1]
command=cat
[program:cat2]
command=cat
[program:cat3]
command=cat
[group:foo]
programs=cat1,cat3
[supervisorctl]
serverurl=unix://%(here)s/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
supervisorctl command can be called with a group name:
supervisorctl restart foo:
as well as with multiple process names:
supervisorctl restart foo:cat1 cat2
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…