一、安装

//直接使用pip安装(pip的安装 http://www.cnblogs.com/yxhblogs/p/8971251.html)
pip install supervisor

二、配置

//运行echo_supervisord_conf 命令重定向到一个配置文件
echo_supervisord_conf > /etc/supervisord.conf

三、修改配置文件

//创建一个目录
mkdir /etc/supervisor.d //把/etc/supervisord.conf 里 include 部分的的配置修改一下,改为如下:
[include]
files = /etc/supervisor.d/*.conf

四、program 配置

[root@localhost supervisord.d]# cat test.conf
;[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=/var/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) //在 supervisord 启动的时候也自动启动
;startsecs=1 ; # of secs prog must stay up to be running (def. 1) //启动 1 秒后没有异常退出,就当作已经正常启动了
;startretries=3 ; max # of serial start failures when starting (default 3) //启动失败自动重试次数,默认是 3
;autorestart=unexpected ; when to restart if exited after running (def: unexpected)
;exitcodes=0,2 ; 'expected' exit codes used with autorestart (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) //把 stderr 重定向到 stdout,默认 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 日志文件大小,默认 50MB
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10) //stdout 日志文件备份数 , 默认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 (0 means none, 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) 更详细配置请参考:https://blog.csdn.net/chenyulancn/article/details/52789565

五、启动

//启动supervisor
supervisord -c /etc/supervisord.conf

Centos7 使用 supervisor 管理进程的更多相关文章

  1. supervisor管理进程 superlance对进程状态报警

    supervisor介绍 首先,介绍一下supervisor.Supervisor(http://supervisord.org/)是用Python开发的一个client/server服务,是Linu ...

  2. Supervisor管理进程

    Supervisor管理进程 转载 2016年04月14日 18:26:45 标签: supervisord 28344 Supervisor重新加载配置启动新的进程 liaojie 发布于 1年前, ...

  3. Supervisor 管理进程,Cloud Insight 监控进程,完美!

    Supervisor 是由 Python 语言编写.基于 linux 操作系统的一款服务器管理工具,用于监控服务器的运行,发现问题能立即自动预警及自动重启等. Cloud Insight 是一款次世代 ...

  4. Centos7 使用 Supervisor 守护进程 Celery

    一.Supervisor 安装(centos7 还有另一个进程守护命令 Systemd ) Centos 7 安装 Supervisord 二.Supervisor 守护进程 Centos7 使用 S ...

  5. Linux服务:使用Supervisor管理进程

    一.简介 由于基本每个公司都会用到supervisor这个进程管理工具,这里简单阐述一下. Supervisor (http://supervisord.org) 是一个用Python写Linux下的 ...

  6. CentOS7 安装supervisor守护进程管理器

    supervisor没有发布在标准的CentOS源在,需要安装epel源.这种方式安装的可能不是最新版本,但比较方便,安装完成之后,配置文件会自动帮你生成. 默认配置文件:/etc/superviso ...

  7. Django与supervisor 管理进程

    1.前言 在Django项目中,我们需要用到一些独立于Django框架外的脚本.这样一些脚本可能需要独立的持续运行,且具有很强的可维护性,这个时候supervisor就可以排上用场了. 基于pytho ...

  8. supervisor管理进程工具配置

    Supervisor(http://supervisord.org/)是用Python开发的一个client/server服务,是Linux/Unix系统下的一个进程管理工具,不支持Windows系统 ...

  9. 在Docker里使用(支持镜像继承的)supervisor管理进程(转)

    这篇文章是受 dockboard 之托帮忙翻译的与 docker 有关的技术文章.译自 Using Supervisor with Docker to manage processes (suppor ...

随机推荐

  1. 【BZOJ1097】[POI2007]旅游景点atr 最短路+状压DP

    [BZOJ1097][POI2007]旅游景点atr Description FGD想从成都去上海旅游.在旅途中他希望经过一些城市并在那里欣赏风景,品尝风味小吃或者做其他的有趣的事情.经过这些城市的顺 ...

  2. 九度OJ 1034:寻找大富翁 (排序)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:5925 解决:2375 题目描述:     浙江桐乡乌镇共有n个人,请找出该镇上的前m个大富翁. 输入:     输入包含多组测试用例.   ...

  3. github Merge method

    About merge methods on GitHub - User Documentation https://help.github.com/articles/about-merge-meth ...

  4. Cauchy sequence Hilbert space 希尔波特空间的柯西序列

    http://mathworld.wolfram.com/HilbertSpace.html A Hilbert space is a vector space  with an inner prod ...

  5. PHP 格式化数字串

    在xls或csv文件中, 超过12位以上的数字会被"科学计数", 所以当php读取这些文件的时候, 会读成 420E+16 , 显然这不是我们想要的, 所以就要用到数字格式化了! ...

  6. cookie和session的原理机制

    会话(Session)跟踪是Web程序中常用的技术,用来跟踪用户的整个会话.常用的会话跟踪技术是Cookie与Session.Cookie通过在客户端记录信息确定用户身份,Session通过在服务器端 ...

  7. 流畅python学习笔记第十八章:使用asyncio包处理并发(二)

    前面介绍了asyncio的用法.下面我们来看下如何用协程的方式来实现之前的旋转指针的方法 @asyncio.coroutine def spin(msg): write,flush=sys.stdou ...

  8. apache 绿色版 安装

    下载绿色版apache 本文已apache2.4为例 http://www.apachehaus.com/cgi-bin/download.plx 下载后解压 打开readme_first.html文 ...

  9. Servlet详解(转)

    我们通过浏览器访问一个网页的过程,实际上是浏览器(例如IE)通过HTTP协议(参见附录B)和Web服务器(也叫做HTTP服务器)进行交互的过程. 也就是说,用户要访问网络资源,首先需要在网络上架设We ...

  10. [2018-05-27]配置VSTS认证方式使用Personal Access Token

    本文介绍下如何配置VSTS(visual studio team service,其实就是微软SaaS版的TFS)通过Personal Access Token访问其下的Git代码库. 问题 使用gi ...