zoukankan      html  css  js  c++  java
  • supervisor使用手册

    一、简介


    Supervisor是用Python开发的一个client/server服务,是Linux/Unix系统下的一个进程管理工具,不支持Windows系统。它可以很方便的监听、启动、停止、重启一个或多个进程。用Supervisor管理的进程,当一个进程意外被杀死,supervisort监听到进程死后,会自动将它重新拉起,很方便的做到进程自动恢复的功能,不再需要自己写shell脚本来控制。

    二、命令


    2.1 命令行模式

    supervisorctl status #查看当前所有守护的程序
    supervisorctl start <program_name> #启动一个程序
    supervisorctl stop <program_name> #关闭一个程序
    supervisorctl restart <program_name> #重启一个程序
    supervisorctl start all #启动所有程序
    supervisorctl stop all #关闭所有程序

    2.2 客户端模式

    输入`supervisorctl`进入客户端模式

    supervisor> status #查看当前所有守护的程序
    supervisor> start <program_name> #启动一个程序
    supervisor> stop <program_name> #关闭一个程序
    supervisor> restart <program_name> #重启一个程序
    supervisor> start all #启动所有程序
    supervisor> stop all #关闭所有程序

    三、日志


    所有程序的日志根据配置文件设置,均放在/log/目录中,以xxx.out.log保存。

    root@yidong:~# cd /log/
    root@yidong:/log# ll
    总用量 148816
    -rw-r--r-- 1 root root 6121921 10月 27 20:29 config.out.log
    -rw-r--r-- 1 root root 10634 10月 27 20:28 eureka.out.log
    -rw-r--r-- 1 root root 733981 10月 27 20:33 frp.out.log
    -rw-r--r-- 1 root root 54754 10月 27 20:33 logstash-img2.out.log
    -rw-r--r-- 1 root root 54049 10月 27 20:33 logstash.out.log
    -rw-r--r-- 1 root root 0 10月 25 19:54 mongod.out.log
    -rw-r--r-- 1 root root 2464284 10月 27 20:30 ms.out.log
    -rw-r--r-- 1 root root 58535 10月 27 20:28 netty.out.log
    -rw-r--r-- 1 root root 34935902 10月 27 20:33 oauth2.out.log
    -rw-r--r-- 1 root root 52428965 10月 27 05:59 oauth2.out.log.1
    -rw-r--r-- 1 root root 52428994 10月 26 10:15 oauth2.out.log.2
    -rw-r--r-- 1 root root 150696 10月 27 20:28 tomcat.out.log
    -rw-r--r-- 1 root root 2860514 10月 27 20:30 ws.out.log
    技术微信群:
    加微信:wonter 发送:技术Q
    医疗微信群:
    加微信:wonter 发送:医疗Q
    更多文章关注公众号:

  • 相关阅读:
    Smarty 模板 insert 局部刷新不缓存功能
    批量选择图片上传的jquery插件
    (转)国外15个前端开发CSS框架介绍
    IE6 下 zindex 设置的 DIV 偏移位置的解决方法
    ecshop的 transport.js 文件和 Jquery 冲突解决方案
    (转) javascript 匿名函数的理解,js括号中括function 如(function(){})
    (转)javascript匿名函数
    jQuery 的 hover 方法等同于 mouseenter + mouseleave 方法
    php set_magic_quotes_runtime() 函数过时
    同域名不同主机下的iframe高度调整
  • 原文地址:https://www.cnblogs.com/Javame/p/14576697.html
Copyright © 2011-2022 走看看