Supervisor管理
#
在linux服务器上部署了node项目,使用supervisor进行管理
要使更新的配置得以应用,需要重新启动supervisor服务。具体操作如下:
二、更新新的配置到supervisord
配置文件: /etc/supervisord.conf
supervisorctl update
三、重新启动配置中的所有程序
supervisorctl reload
四、启动某个进程(program_name=你配置中写的程序名称)
supervisorctl start program_name
五、查看正在守候的进程
supervisorctl
六、停止某一进程 (program_name=你配置中写的程序名称)
supervisorctl stop program_name
七、重启某一进程 (program_name=你配置中写的程序名称)
supervisorctl restart program_name
Supervisor 配置
#
;[program:vocalprint]
;directory=/home/uploadvoice ; directory to cwd to before exec (def no cwd)
;command=/home/uploadvoice/vocalprint ; the program (relative uses PATH, can take args)
;autostart=true ; start at supervisord start (default: true)
;startsecs=10 ; # of secs prog must stay up to be running (def. 1)
;autorestart=unexpected ; when to restart if exited after running (def: unexpected)
;startretries=3 ; max # of serial start failures when starting (default 3)
;redirect_stderr=true ; redirect proc stderr to stdout (default false)
;stdout_logfile=/mnt/data/supervisor/vocalprint.log ; stdout log path, NONE for none; default AUTO
;[include]
;files = relative/directory/*.ini