当前位置:网站首页>supervisor常用命令
supervisor常用命令
2022-07-21 13:43:00 【junjunzai123】
一、开启命令
- supervisor的服务器端部分启动命令:
- sudo unlink /var/run/supervisor.sock
- supervisord -c /etc/supervisor/supervisord.conf 此时默认开启了所有服务
supervisor的客户端部分命令:
- supervisorctl status 查看进程运行状态
- supervisorctl start 进程名 启动进程
- supervisorctl stop 进程名 关闭进程
- supervisorctl restart 进程名 重启进程
- supervisorctl update 重新载入配置文件
- supervisorctl shutdown 关闭supervisord
- supervisorctl clear 进程名 清空进程日志
- supervisorctl 进入到交互模式下。使用help查看所有命令。
- start stop restart + all 表示启动,关闭,重启所有进程。
二、关闭命令
- supervisorctl stop all先关闭supervisor服务
之后再关闭supervisord服务 - kill -9 pid
三 supervisor文件的分级管理
- 在文件supervisord.conf文件中进行文件配置, 在文件的最后加上一行, 例如:
[include]
files = /local/service/supervisor/conf/*.ini
- 根据添加的代码可知, 其他的启动程序的文件都放到了conf文件夹下, conf文件夹下文件展示:
celery-server.ini cpv-server.ini
- 文件内容配置如下:
[program:cpv-server-batchrec]
directory=/home/deploy/research/workspace/cpv_server
command=/home/deploy/anaconda3/envs/cpv_server/bin/gunicorn cpv_celery:flask_app --workers 1 --bind 0.0.0.0:xxxx --log-level=debug
- 说明: 这样就将任务从supervisord.conf文件中分离出来了, 然后启动的时候需要更新任务即执行如下命令:
supervisorctl update
执行完以上代码之后, 才可以启动任务执行如下命令:
supervisorctl start 服务名称(即上述ini文件中的program的名字)
边栏推荐
- 多种方式Map集合遍历
- [basis of concurrent programming] - thread safety of collections
- HTTP缓存策略,强缓存,协商缓存
- StringUtils 和 String 方法一览
- Mlx90640 infrared thermal imaging sensor temperature measurement module development notes (III)
- 记一次 .NET 某消防物联网 后台服务 内存泄漏分析
- 小程序技术解决桌面应用敏捷迭代的一种思路
- pdf. JS how to Preview PDF files of Base64 type
- Virtual machine cannot connect to the Internet
- Isn't it hard? You hit me! Hands on teaching!
猜你喜欢
matlab-最小二乘法拟合
StringUtils 和 String 方法一览
ES6 from getting started to mastering 02:let and const commands
Codeforces Round #794 (Div. 2)(A.B.C)
被罗敏制霸的直播间,躲得开陆正耀吗?
Matlab least square fitting
Photovoltaic power generation system and its MPPT control
Detailed explanation of onvif protocol and protocol testing tools
The darling of "all-optical" era - 400g optical module
详解SOAP简单对象访问协议
随机推荐
HTTP cache policy, strong cache, negotiation cache
这还不硬?你来打我!手把手教学!
ROS2学习笔记:Launch脚本
容器学习中的简答题
【微信小程序授权】获取用户手机号,昵称
Map collection traversal in multiple ways
JS&&TS学习总结
多种方式Map集合遍历
814. Binary tree pruning: simple recursive problem
2022.7.9 summer vacation personal training 1-b.how old are you Mr. string
数组学习导航
Tensorflow入门教程(三十七)——DC-VNet
“中国网事·感动2022”二季度网络感动人物评选结果揭晓
上午面了个腾讯拿 38K 出来的,让我见识到了基础的天花板
基于SqlSugar的开发框架循序渐进介绍(12)-- 拆分页面模块内容为组件,实现分而治之的处理
Tensorflow introductory tutorial (XXXIII) -- image segmentation loss function focalloss
matlab-最小二乘法拟合
半导体产业动态杂谈
The state Internet Information Office made a decision on the administrative punishment related to the network security review of didi Global Co., Ltd. in accordance with the law
Virtual machine cannot connect to the Internet