当前位置:网站首页>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
边栏推荐
- Mac新手必备小技巧
- Huawei HCIA notes
- How Facebook open source framework simplifies pytorch experiment
- CPU瞒着内存竟干出这种事
- Count the frequency of letters in text (case insensitive)
- What should be considered in the promotion plan outside the station?
- Git代码提交操作,以及git push提示failed to push some refs'XXX'
- Stack bracket matching
- Don't treat exceptions as business logic, which you can't afford
- 阿里terway源码分析
猜你喜欢

Count the frequency of letters in text (case insensitive)

使用“1”个参数调用“DownloadString”时发生异常:“操作超时”

If you want to forget the WiFi network you used to connect to your Mac, try this!

从技术谈到管理,把系统优化的技术用到企业管理

Win10官方1909版本无法打开windows安全中心中病毒和威胁防护的实时保护解决方案。

Deep into web workers (1)

CPU瞒着内存竟干出这种事

Using thread communication to solve the problem of cache penetrating database avalanche

How to choose a good company

C语言I博客作业03
随机推荐
[random talk] the goal and way of software design
盘点那些争议最大的编程观点,你是什么看法呢?
The most hard core of the whole network explains the computer startup process
Using thread communication to solve the problem of cache penetrating database avalanche
chrome浏览器跨域Cookie的SameSite问题导致访问iframe内嵌页面异常
Exception calling 'downloadstring' with '1' arguments: 'operation timed out'
What do you think of the most controversial programming ideas?
The JS solution cannot be executed after Ajax loads HTML
微服务的出现和意义的探索
Web API系列(三)统一异常处理
阿里terway源码分析
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
Three steps, one pit, five steps and one thunder, how to lead the technical team under the rapid growth?
C语言I博客作业03
深入web workers (上)
Tips for Mac novices
计组-总线通信控制之异步串行通信的数据传输
websocket+probuf.原理篇
easyui dialog“缓存问题”
Analysis of kubernetes service types: from concept to practice