当前位置:网站首页>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
边栏推荐
- Don't treat exceptions as business logic, which you can't afford
- Share several vs Code plug-ins I use everyday
- What do you think of the most controversial programming ideas?
- awk实现类sql的join操作
- 在 Amazon SageMaker 管道模式下使用 Horovod 实现多 GPU 分布式训练
- 留给快手的时间不多了
- Git代码提交操作,以及git push提示failed to push some refs'XXX'
- AFO记
- Web安全(三)---CSRF攻击
- Do not understand the underlying principle of database index? That's because you don't have a B tree in your heart
猜你喜欢
年薪90万程序员不如月入3800公务员?安稳与高收入,到底如何选择?
计组-总线通信控制之异步串行通信的数据传输
Ac86u KX Online
Do not understand the underlying principle of database index? That's because you don't have a B tree in your heart
The JS solution cannot be executed after Ajax loads HTML
Awk implements SQL like join operation
华为HCIA笔记
不要把异常当做业务逻辑,这性能可能你无法承受
Tips for Mac novices
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
随机推荐
The prediction accuracy of the model is as high as 94%! Using machine learning to solve the 200 billion dollar inventory problem perfectly
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
How to deal with data leakage and deletion related to business life and death?
websocket+probuf.原理篇
Thinkphp6中where条件中字段与字段比较条件的写法
static+代码块+多态+异常
Adobe Lightroom /Lr 2021软件安装包(附安装教程)
栈-括号的匹配
分享几个我日常使用的VS Code插件
京淘项目day09
高级并发编程系列九(Lock接口分析)
How to think in the way of computer
30岁后,你还剩下什么?
汇编函数mcall systemstack asmcgocall syscall
C语言Ⅰ博客作业03
如何应对事关业务生死的数据泄露和删改?
[漫谈] 软件设计的目标和途径
Summary of the resumption of a 618 promotion project
从技术谈到管理,把系统优化的技术用到企业管理
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入