一、安装

//直接使用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. 各种jar包下方法的使用

    commons-codec-1.6.jar: DigestUtils.md5Hex(String str); httpclient-4.2.2.jar: HttpClient client=new D ...

  2. 九度OJ 1155:鸡兔同笼 (基础题)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:2032 解决:1369 题目描述: 一个笼子里面关了鸡和兔子(鸡有2只脚,兔子有4只脚,没有例外).已经知道了笼子里面脚的总数a,问笼子里面 ...

  3. 列举Python常用数据类型并尽量多的写出其中的方法

    #1 把字符串的第一个字符大写 string.capitalize() #2 返回一个原字符串居中,并使用空格填充至长度 width 的新字符串 string.center(width) #3 返回 ...

  4. Java for LeetCode 129 Sum Root to Leaf Numbers

    Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number ...

  5. contenttype应用 , 缓存相关

    一. Django的contenttypes contenttypes 是Django内置的一个应用,可以追踪项目中所有 app和model 的对应关系,并记录在 django_content_typ ...

  6. 《CSS权威指南(第三版)》---第二章 选择器

    本章的主要内容是,怎么获取文档中的元素给予渲染: 1.元素选择器: 2.ID选择器: 3.CLSSS选择器: 4.通配选择器:*; 5.属性选择器:selector[] 6.部分属性选择器: sele ...

  7. windows server 2008 r2 下发布网站excel有时候无法下载文档

    最近将公司网站服务器更新了系统,从win2003 到 win2008 r2 (64bit),一切正常,但是使用网站的过程中发现了一个比较奇怪的问题,就是,有时候网站的excel文档无法下载,但是我什么 ...

  8. 使用diff制作补丁【学习笔记】

    源文件:main.c #include <stdio.h> int main() { printf("hello"); } 修改之后的文件: main1.c #incl ...

  9. 大数据初级笔记二:Hadoop入门之Hadoop集群搭建

    Hadoop集群搭建 把环境全部准备好,包括编程环境. JDK安装 版本要求: 强烈建议使用64位的JDK版本,这样的优势在于JVM的能够访问到的最大内存就不受限制,基于后期可能会学习到Spark技术 ...

  10. 草原psd素材

    草原PSD素材,草原,风景,蓝天白云,飞鸟,阳光,绿色,草地. http://www.huiyi8.com/caoyuan/psd/