Reputation: 78244
I am new to supervisor. Below is my supervisor config file.
# -*- 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
Now, I need to demonize the process where:
1) I can stop the parent proccess and all childs
2) Start
3) Reload all child process
4) If a child fails then automatically restarted.
5) Here is the command line to start
supervisord -c /home/ubuntu/workspace/rtbopsConfig/rtb_supervisor/tornadoSupervisor.conf
So...do I use runit? Upstart?
As of now I have kill -9 all parent and child prossess and if I do, the are not respawned.
Upvotes: 1
Views: 2435
Reputation: 6055
Take a look at supervisorctl
, it allows you to start/restart/auto-start/stop processes. If that doesn't fit your needs, you can also communicate with supervisor
through XML-RPC.
Upvotes: 1