当前位置:网站首页>supervisor进程管理安装使用
supervisor进程管理安装使用
2020-11-07 20:57:00 【Coxhuang】
文章目录
- supervisor 安装使用
- #1 环境
- #2 需求
- #3 开始
- #4 例子
supervisor 安装使用
#1 环境
Ubuntu16.04 Python 3.8.1
#2 需求
- 监控进程
#3 开始
- 安装
sudo apt-get install supervisor
- 启动
service supervisor start 或者 supervisord -c /etc/supervisor/supervisord.conf
- 生成配置文件
echo_supervisord_conf > /etc/supervisor/supervisord.conf
- 配置文件路径
sudo mkdir -p /etc/supervisor/conf.d/
vim /etc/supervisor/supervisord.conf
在最后加上以下内容 :
[include] files = /etc/supervisor/conf.d/*.conf
- 启动可视化界面
在配置
supervisord.conf
文件将以下注释打开
[inet_http_server] ; inet (TCP) server disabled by default port=0.0.0.0:9002 ; (ip_address:port specifier, *:port for all iface) username=user ; (default is no username (open server)) password=123 ; (default is no password (open server))
- 使用
命令行 |
说明 |
---|---|
supervisord |
启动 |
supervisord -c /etc/supervisor/supervisord.conf |
以xxx配置文件启动 |
supervisorctl |
进入命令行 |
supervisorctl status |
查看状态 |
supervisorctl reload |
重新加载配置 |
supervisorctl start processname |
启动进程 |
supervisorctl stop processname |
关闭进程 |
supervisorctl restart processname |
重启进程 |
#4 例子
xxx.conf
[group:multiprocesstest] programs=multiprocess [program:multiprocess] command=python3 /home/cox/work/test/multiprocess_suspend/multiprocess_suspend.py directory=/home/cox user=cox autorestart=true redirect_stderr=true stopasgroup=true
官方文档 :
本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。
版权声明
本文为[Coxhuang]所创,转载请带上原文链接,感谢
https://cloud.tencent.com/developer/article/1744575
边栏推荐
- Share several vs Code plug-ins I use everyday
- 当 TiDB 与 Flink 相结合:高效、易用的实时数仓
- When tidb and Flink are combined: efficient and easy to use real-time data warehouse
- The most hard core of the whole network explains the computer startup process
- Web API系列(三)统一异常处理
- 如何应对事关业务生死的数据泄露和删改?
- Business Facade 与 Business Rule
- CPU瞒着内存竟干出这种事
- Adobe Prelude /Pl 2020软件安装包(附安装教程)
- easyui dialog“缓存问题”
猜你喜欢
编程界大佬教你:一行Python代码能做出哪些神奇的事情?
全网最硬核讲解计算机启动流程
深入web workers (上)
The samesite problem of cross domain cookie of Chrome browser results in abnormal access to iframe embedded pages
Annual salary of 900000 programmers is not as good as 3800 civil servants a month? How to choose between stability and high income?
Deep into web workers (1)
What magic things can a line of Python code do?
Let's talk about the locks in the database
awk实现类sql的join操作
Analysis of kubernetes service types: from concept to practice
随机推荐
Recommend suicide, openai warns: gpt-3 is too risky for medical purposes
工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
AFO
awk实现类sql的join操作
How did I lose control of the team?
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
华为HCIA笔记
[C + + learning notes] how about the simple use of the C + + standard library STD:: thread?
你可能不知道的Animation动画技巧与细节
Web安全(二)---跨域资源共享
Thinkphp6中where条件中字段与字段比较条件的写法
Kylin on kubernetes' practice on eBay
洞察——风格注意力网络(SANet)在任意风格迁移中的应用
从技术谈到管理,把系统优化的技术用到企业管理
MongoDB下,启动服务时,出现“服务没有响应控制功能”解决方法
工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
大数据算法——布隆过滤器
利用线程通信、解决缓存穿透数据库雪崩
ngnix集群高并发
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?