supervisor官网网址,supervisor安装配置与使用介绍(三)

发布时间:2016-04-13 10:38:28 来源:大铁棍娱乐网

《supervisor官网网址,supervisor安装配置与使用介绍(三)》是由大铁棍娱乐网(www.datiegun.com)编辑为你整理收集在【教育学习】栏目,于2016-04-13 10:38:28整理发布,希望对你有所帮助,可及时向我们反馈。

  可以通过supervisorctl查看管理监控的进程情况:

  [op1@SVR1631HP360 ~]$ sudo supervisorctl

  publisher_for_detail RUNNING pid 27557, uptime 0:00:45

  publisher_for_detail_nt RUNNING pid 27567, uptime 0:00:45

  publisher_for_summary RUNNING pid 27566, uptime 0:00:45

  publisher_for_summary_nt RUNNING pid 27568, uptime 0:00:45

  worker_for_detail_all RUNNING pid 27581, uptime 0:00:45

  worker_for_detail_recent RUNNING pid 27582, uptime 0:00:45

  worker_for_summary RUNNING pid 27559, uptime 0:00:45

  #可通过help了解命令的更多用法

  supervisor> help

  Documented commands (type help ):

  ========================================

  EOF exit maintail quit restart start stop

  clear help open reload shutdown status tail

  supervisor> help stop

  stop Stop a process.

  stop 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 Get status on a single process by name.

  status 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


推荐阅读