centos7安装配置supervisor守护进程
yum install Supervisor
supervisord -c /etc/supervisord.conf
进入 cd /etc 目录 找到supervisord.conf 配置文件 和 supervisord.d 文件夹,使用vim编辑supervisord.conf文件,它会加载supervisord.d文件夹中的所有.ini配置文件
[program:DeployLinux] #DeployLinux 为程序的名称
command=dotnet DeployLinux.dll #需要执行的命令
directory=/home/publish #命令执行的目录
environment=ASPNETCORE__ENVIRONMENT=Production #环境变量 注释符不用# 环境变量可以省略
user=root #用户
stopsignal=INT
autostart=true #是否自启动
autorestart=true #是否自动重启
startsecs=3 #自动重启时间间隔(s)
stderr_logfile=/var/log/ossoffical.err.log #错误日志文件
stdout_logfile=/var/log/ossoffical.out.log #输出日志文件
配置实例
[program:future_price_depth_new.py]
command=python /bot/mkr/future_price_depth_new.py 注意intergal_util.py用python3启动 [command=python3 /bot/mkr/future_price_depth_new.py]
directory=/bot/mkr/
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
stderr_logfile=/bot/log/future_price_depth_new.err.log
stdout_logfile=/bot/log/future_price_depth_new.out.log
supervisorctl reload //重新加载配置文件
常用命令介绍
supervisorctl 是 supervisord的命令行客户端工具
supervisorctl status:查看所有进程的状态
supervisorctl stop es:停止es
supervisorctl start es:启动es
supervisorctl restart es: 重启es
supervisorctl update :配置文件修改后可以使用该命令加载新的配置
supervisorctl reload: 重新启动配置中的所有程序
或者
supervisord -c supervisor.conf 通过配置文件启动supervisor
supervisorctl -c supervisor.conf status 查看状态
supervisorctl -c supervisor.conf reload 重新载入配置文件
supervisorctl -c supervisor.conf start [all]|[x] 启动所有/指定的程序进程
supervisorctl -c supervisor.conf stop [all]|[x] 关闭所有/指定的程序进程
ps -ef|grep python
root 572 1 0 Dec15 ? 00:00:17 /usr/bin/python2 -Es /usr/sbin/tuned -l -P
root 7704 7686 1 16:13 pts/2 00:03:06 /root/anaconda3/bin/python3 future_price_depth_new_2.py
root 7726 7708 1 16:13 pts/3 00:03:08 /root/anaconda3/bin/python3 future_price_depth_new.py
root 8291 1 1 Dec06 ? 04:10:59 python future_price_depth_new.py
root 8298 1 1 Dec06 ? 04:06:28 python future_price_depth_new_2.py
root 16948 1 0 19:46 ? 00:00:00 /usr/bin/python /usr/bin/supervisord -c /etc/supervisord.conf
root 16949 16948 3 19:46 ? 00:00:00 python /bot/mkr/future_price_depth_new.py
root 16950 16948 7 19:46 ? 00:00:00 python /bot/mkr/timer_util.py
root 16951 16948 9 19:46 ? 00:00:01 python3 /bot/mkr/intergal_util.py
root 16952 16948 9 19:46 ? 00:00:01 python /bot/mkr/mkr.py
root 16953 16948 1 19:46 ? 00:00:00 python /bot/mkr/webs_util.py
root 16963 16952 8 19:46 ? 00:00:00 /root/anaconda3/bin/python /bot/mkr/mkr.py
root 16977 10161 0 19:46 pts/0 00:00:00 grep --color=auto python
root 19717 1 0 Dec15 ? 00:04:00 python -u w267bot.py -273195517 605518038:AAGy5TAoc4DfeW3Ol3ezEryqYEJGgq7mbF0
centos7安装配置supervisor守护进程的更多相关文章
- 【转载】Centos7 中使用Supervisor守护进程
配置supervisor实现进程守护 1.安装supervisor yum install Supervisor 2.启动服务 supervisord -c /etc/supervisord.co ...
- Centos7 中使用Supervisor守护进程
转:https://www.cnblogs.com/qmhuang/p/8196132.html 配置supervisor实现进程守护 1.安装supervisor yum install Super ...
- 【Centos7】 中使用Supervisor守护进程
原文出处: Centos7 中使用Supervisor守护进程 配置supervisor实现进程守护 1.安装supervisor yum install Supervisor 2.启动服务 su ...
- Centos7 使用 Supervisor 守护进程 Celery
一.Supervisor 安装(centos7 还有另一个进程守护命令 Systemd ) Centos 7 安装 Supervisord 二.Supervisor 守护进程 Centos7 使用 S ...
- CentOS7 安装配置笔记
CentOS7 安装配置笔记 1.通过镜像安装 CentOS7 ==============================* 使用 UltraISO 9.7 或者 rufus-3.5p 制作ISO的 ...
- (转)Centos7安装配置NFS服务和挂载
Centos7安装配置NFS服务和挂载 原文:https://www.u22e.com/601.html NFS简介 NFS(Network File System)即网络文件系统,是FreeBSD支 ...
- Centos7安装配置gitlab
Centos7安装配置gitlab 这篇文字我会介绍在Centos7上安装gitlab,配置gitlab的smtp,并且创建项目demo. sudo yum install openssh-serve ...
- Centos7安装配置Apache+PHP+Mysql+phpmyadmin
转载自: Centos7安装配置Apache+PHP+Mysql+phpmyadmin 一.安装Apache yum install httpd 安装成功后,Apache操作命令: systemctl ...
- Centos7安装配置JDK8
Centos7安装配置JDK8 一.准备工作 第一步,去甲骨文官网下载Jdk相应的版本,我这里下载的是jdk1.8. 第二步将你从官网上下载下来的jdk使用FTP工具上传到云服务器上的相应目录,我的是 ...
随机推荐
- 定位(left 、right 、top 、 bottom)、padding、margin 值设为百分比值时
定位(left .right .top . bottom): top 为例 right 为例 padding.margin : 当padding.margin 值设为百分比值时,其百分比会相对于父元素 ...
- 人物 - Larry Elison
甲骨文公司创始人 甲骨文公司首席執行官 狂人,偏执狂 曾说:"Winning is not enough. All others must lose" Only the paran ...
- Java中进行Md5加密
java文件 https://pan.baidu.com/s/1kXcif35 密码:3cjd 代码案例: package cn.itcast.estore.utils; import java.m ...
- 在java中调用python方法
1.http://sourceforge.net/projects/jython/下载jython包,把其中的jython.jar添加到工程目录 示例: 1.摘自:http://blog.csdn.n ...
- Python学习第八课——函数
python函数(def) def test(x): # x为形参 y = x + 20 return y # def:定义函数的关键字 # test:函数名 # ():内定义参数 # x+=1:代码 ...
- stm32CubeMx工程使用GCC编译
软件: STM32CubeMx 5.0 GCC编译器 STM32 ST Link Utility 下载器:ST Link V2 1 安装gcc编译器 能编译ARM Cortex M核的GCC编译器下 ...
- rsa免密钥登陆
#第一步 生成密钥,一路回车就行 ssh-keygen -t rsa #第二步 将密钥拷贝到目标服务器上,注意双引号 ssh-copy-id -i ~/.ssh/id_rsa.pub "ro ...
- ch4 背景图像基础
如果希望网站有一个好看的背景,只需将背景应用于主体元素,即在body上应用background-image,默认情况下浏览器水平和垂直的重复显示背景图像,让图像平铺在整个页面上,可以选择背景图像是垂直 ...
- php 实现店铺装修8
/** * @title 店铺装修--根据分类获取商品列表 * @param source 是 int 来源(1--h5.2--app) * @param type 是 string 店铺类型--首页 ...
- 题解 P3258 【[JLOI2014]松鼠的新家】
树链剖分板子题 先说点别的 小熊维尼啊,嘿嘿嘿. 写题经历 悲惨命运:树剖调了2天,一直90分,死活不AC,调出了心病,快下课时改了一下数据范围,A了--.(刚开始数组开了800100,改120010 ...