supervisor安装配置与使用(3)

supervisor> help stop
stop <processname>   Stop a process.
stop <processname> <processname> Stop multiple processes
stop all    Stop all processes
  When all processes are stopped, they are stopped in
  reverse priority order (see config file)
supervisor> help status
status   Get all process status info.
status <name>  Get status on a single process by name.
status <name> <name> Get status on multiple named processes.

#停止某个进程
supervisor> stop publisher_for_summary
publisher_for_summary: stopped

#查看此时此刻的状态
supervisor> status
publisher_for_detail RUNNING    pid 27557, uptime 0:05:41
publisher_for_detail_nt RUNNING    pid 27567, uptime 0:05:41
publisher_for_summary STOPPED    Feb 27 02:48 PM
publisher_for_summary_nt RUNNING    pid 27568, uptime 0:05:41
worker_for_detail_all RUNNING    pid 27581, uptime 0:05:41
worker_for_detail_recent RUNNING    pid 27582, uptime 0:05:41
worker_for_summary RUNNING    pid 27559, uptime 0:05:41
#发现被supervisorctl停掉的进程不会被自动重启

#开启刚才停掉的进程
supervisor> start publisher_for_summary
publisher_for_summary: started
supervisor> status
publisher_for_detail RUNNING    pid 27557, uptime 0:08:02
publisher_for_detail_nt RUNNING    pid 27567, uptime 0:08:02
publisher_for_summary RUNNING    pid 3035, uptime 0:00:04
publisher_for_summary_nt RUNNING    pid 27568, uptime 0:08:02
worker_for_detail_all RUNNING    pid 27581, uptime 0:08:02
worker_for_detail_recent RUNNING    pid 27582, uptime 0:08:02
worker_for_summary RUNNING    pid 27559, uptime 0:08:02

#停掉所有进程
supervisor> stop all
worker_for_detail_recent: stopped
worker_for_detail_all: stopped
publisher_for_summary_nt: stopped
publisher_for_detail_nt: stopped
publisher_for_summary: stopped
worker_for_summary: stopped
publisher_for_detail: stopped
supervisor> status
publisher_for_detail STOPPED    Feb 27 02:51 PM
publisher_for_detail_nt STOPPED    Feb 27 02:51 PM
publisher_for_summary STOPPED    Feb 27 02:51 PM
publisher_for_summary_nt STOPPED    Feb 27 02:51 PM
worker_for_detail_all STOPPED    Feb 27 02:51 PM
worker_for_detail_recent STOPPED    Feb 27 02:51 PM
worker_for_summary STOPPED    Feb 27 02:51 PM

#开启所有进程
supervisor> start all
publisher_for_detail: started
worker_for_summary: started
publisher_for_summary: started
publisher_for_detail_nt: started
publisher_for_summary_nt: started
worker_for_detail_all: started
worker_for_detail_recent: started
supervisor> status
publisher_for_detail RUNNING    pid 5111, uptime 0:00:15
publisher_for_detail_nt RUNNING    pid 5141, uptime 0:00:15
publisher_for_summary RUNNING    pid 5135, uptime 0:00:15
publisher_for_summary_nt RUNNING    pid 5147, uptime 0:00:15
worker_for_detail_all RUNNING    pid 5153, uptime 0:00:15
worker_for_detail_recent RUNNING    pid 5159, uptime 0:00:14
worker_for_summary RUNNING    pid 5112, uptime 0:00:15

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/250a9381f388191ced245816b234bf9d.html