Supervisor 是一个客户端服务器系统,允许用户监控和控制类 Unix 操作系统上的进程数。

官网 http://supervisord.org

安装
1. easy_install supervisor
2.
setuptools (latest) from http://pypi.python.org/pypi/setuptools.
meld3 (latest) from http://www.plope.com/software/meld3/.
elementtree (latest) from http://effbot.org/downloads#elementtree.

建立配置文件
echo_supervisord_conf > /etc/supervisord.conf
指定配置文件
supervisord -c supervisord.conf

查找配置文件路经
-c 指定配置文件
无指定配置文件时,查找顺序:
1 $CWD/supervisord.conf
2 $CWD/etc/supervisord.conf
3 /etc/supervisord.conf

配置文件说明

HTTP/XML-RPC 相关配置
[unix_http_server]
file = /tmp/supervisor.sock
chmod = 0777
chown= nobody:nogroup
username = user
password = 123

Web管理界面配置
[inet_http_server]
port = 127.0.0.1:9001
username = user
password = 123

[supervisorctl]
serverurl = unix:///tmp/supervisor.sock 和[unix_http_server]匹配
username = chris
password = 123
prompt = mysupervisor

日志 环境等配置
[supervisord]
logfile = /tmp/supervisord.log
logfile_maxbytes = 50MB
logfile_backups=10
loglevel = info
pidfile = /tmp/supervisord.pid
nodaemon = false
minfds = 1024
minprocs = 200
umask = 022
user = chrism
identifier = supervisor
directory = /tmp
nocleanup = true
childlogdir = /tmp
strip_ansi = false
environment = KEY1="value1",KEY2="value2"

配置单个进程
[program:theprogramname]
command=/bin/cat ; the program (relative uses PATH, can take args)
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
numprocs=1 ; number of processes copies to start (def 1)
directory=/tmp ; directory to cwd to before exec (def no cwd)
umask=022 ; umask for process (default None)
priority=999 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)
autorestart=unexpected ; whether/when to restart (default: unexpected)
startsecs=1 ; number of secs prog must stay running (def. 1)
startretries=3 ; max # of serial start failures (default 3)
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
stopsignal=QUIT ; signal used to kill process (default TERM)
stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
stopasgroup=false ; send stop signal to the UNIX process group (default false)
killasgroup=false ; SIGKILL the UNIX process group (def false)
user=chrism ; setuid to this UNIX account to run the program
redirect_stderr=true ; redirect proc stderr to stdout (default false)
stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
stdout_events_enabled=false ; emit events on stdout writes (default false)
stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
stderr_events_enabled=false ; emit events on stderr writes (default false)
environment=A="1",B="2" ; process environment additions (def no adds)
serverurl=AUTO ; override serverurl computation (childutils)

另外配置还有
[fcgi-program:x]

[eventlistener:x]

[rpcinterface:x]

包含指定的配置文件
[include]
files = /an/absolute/filename.conf /an/absolute/*.conf foo.conf config??.conf

【Linux】类Unix 操作系统进程监控控制工具 Supervisor相关推荐

  1. linux(类UNIX)体系家族

    Linux是一种自由和开放源码的类Unix操作系统.目前存在着许多不同的Linux,但它们都使用了Linux内核.Linux可安装在各种计算机硬件设备中,从手机.平板电脑.路由器和视频游戏控制台,到台 ...

  2. 推荐几个Linux命令行下性能监控小工具

    原文链接 在Linux中,CPU,内存等系统状态可以通过top命令查看,或者用图形界面的工具,如gnome-system-monitor.但是,有时候,想知道更详细的信息,比如说进程树之类的,网络具体 ...

  3. git管理工具 linux,linux系统下使用流行的版本管理工具 Git

    前几天被版本管理困扰了好久,主要是因为 没法回到之前的版本,新版本又出了问题真的很尴尬. 终于决定使用目前网上很火的版本管理工具-------Git 历史啥的就不说了,说些有用的. 我用的是oschi ...

  4. 电脑如何远程连接到服务器?Windows、Linux、Unix系统远程连接服务器演示

    Windows.Linux.Unix系统远程连接服务器演示 一.Windows操作系统 二.Linux.Unix操作系统 服务器操作系统可以实现对计算机硬件与软件的直接控制和管理协调,任何计算机的运行 ...

  5. Linux资源监控命令/工具(综合)

    目录: ps pstree pidof top free uptime ifuser lsof mpstat vmstst pidstat iostat iotop watch sar 1.ps 1) ...

  6. 监控 Linux 性能的 18 个命令行工具

    对于系统和网络管理员来说每天监控和调试Linux系统的性能问题是一项繁重的工作.在IT领域作为一名Linux系统的管理员工作5年后,我逐渐认识到监控和保持系统启动并运行是多么的不容易.基于此原因,我们 ...

  7. [转载]监控 Linux 性能的 18 个命令行工具

    转自:http://www.kuqin.com/shuoit/20140219/338066.html 对于系统和网络管理员来说每天监控和调试Linux系统的性能问题是一项繁重的工作.在IT领域作为一 ...

  8. UNIX操作系统和Linux操作系统介绍

          UNIX操作系统(尤尼斯),是一个强大的多用户.多任务操作系统,支持多种处理器架构,按照操作系统的分类,属于分时操作系统,最早由KenThompson.DennisRitchie和Doug ...

  9. 《Unix/Linux日志分析与流量监控》书稿完成

    <Unix/Linux日志分析与流量监控>书稿完成 近日,历时3年创作的75万字书稿已完成,本书紧紧围绕网络安全的主题,对各种Unix/Linux系统及网络服务日志进行了全面系统的讲解,从 ...

最新文章

  1. springboot 创建地址_手把手教你Spring Boot入门开发
  2. 深入浅出聊一聊Docker
  3. mingw+libpython安装记录
  4. leetcode1432. 改变一个整数能得到的最大差值(贪心)
  5. LZW算法PHP实现方法 lzw_decompress php
  6. java手动分页工具类
  7. Java学习——对象和类
  8. error C2011: “Font”:“struct”类型重定义
  9. 试图在loongarch64上编译JNA失败
  10. 【代码优化】注解优先命名模式
  11. 金融用计算机,CFA考试指定计算器使用攻略
  12. 使用rpm 安装wget
  13. 华为模拟器eNSP练习题 - VLAN综合实验
  14. 高等数学:第八章 多元函数的微分法及其应用(6)微分法在几何上的应用
  15. 《鬼谷子》捭阖第一(翻译)
  16. linux gz he xz,gz与xz两种压缩格式的对比
  17. iP138版 iP地址 离线iP数据库 ip.dat详解
  18. Java并发学习笔记19 线程池 ThreadPoolExecutor
  19. 3D打印机T3升级corexy  制作过程(三)
  20. 华为ensp ospf综合实验

热门文章

  1. Java值传递与引用传递
  2. 使用elementui实现表单上传功能_elementUI实现自定义上传文件并携带参数
  3. 什么是以太坊?它到底怎么运作的?
  4. k8s-harbor安装
  5. 简单探讨TypeScript 枚举类型
  6. html建立复选框,创建一个像html复选框一样的div
  7. linux的shell的功能,linux shell中${ }的一些特异功能
  8. 【Java】基本二叉搜索树讲解
  9. 2020牛客多校第1场H-Minimum-cost Flow
  10. emwin读取sd图片_262.3MB/S读取速率,雷克沙1667X这回谁还敢吐槽