当前位置:网站首页>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
边栏推荐
- Awk implements SQL like join operation
- The JS solution cannot be executed after Ajax loads HTML
- Do not understand the underlying principle of database index? That's because you don't have a B tree in your heart
- AFO
- The official 1909 version of win10 cannot open the real-time protection solution of virus and threat protection in windows security center.
- 一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
- 屏读时代,我们患上了注意力缺失候群症
- Exception calling 'downloadstring' with '1' arguments: 'operation timed out'
- What do you think of the most controversial programming ideas?
- 聊一聊数据库中的锁
猜你喜欢

chrome浏览器跨域Cookie的SameSite问题导致访问iframe内嵌页面异常

CPU瞒着内存竟干出这种事

Bgfx compilation tutorial

一万四千字分布式事务原理解析,全部掌握你还怕面试被问?

delphi10的rest.json与system.json的踩坑

想要忘记以前连接到Mac的WiFi网络,试试这个方法!

Business facade and business rule

Web API series (3) unified exception handling

Analysis of kubernetes service types: from concept to practice

盘点那些争议最大的编程观点,你是什么看法呢?
随机推荐
Adobe Lightroom /Lr 2021软件安装包(附安装教程)
Kubernetes服务类型浅析:从概念到实践
What kind of technical ability should a programmer who has worked for 1-3 years? How to improve?
The samesite problem of cross domain cookie of Chrome browser results in abnormal access to iframe embedded pages
ngnix集群高并发
你可能不知道的Animation动画技巧与细节
如何高效的学习技术
不懂数据库索引的底层原理?那是因为你心里没点b树
On hiz buffer
Awk implements SQL like join operation
Adobe Prelude /Pl 2020软件安装包(附安装教程)
Implementation of multi GPU distributed training with horovod in Amazon sagemaker pipeline mode
站外推广的计划需要考虑哪些呢?
汇编函数mcall systemstack asmcgocall syscall
Reflection on a case of bus card being stolen and swiped
Web API series (3) unified exception handling
从技术谈到管理,把系统优化的技术用到企业管理
Share several vs Code plug-ins I use everyday
Let's talk about the locks in the database
Deep into web workers (1)