supervisor备忘
旨在快速配置supervisor
常见问题
如何不重启supervisor的情况重新读取配置
supervisorctl reload
- 如何不让程序随supervisor自动启动
在conf中添加
autostart=false
- 多进程如何同时关闭子进程
在conf中添加
stopasgroup=true
下载supervisor
pip install supervisor
创建配置文件
[supervisord]
logfile = /home/john.wang/tmp/supervisord.log
logfile_maxbytes = 50MB
logfile_backups=10
loglevel = info
pidfile = /tmp/supervisord.pid
nodaemon = false
minfds = 1024
minprocs = 200
umask = 022
user = john.wang
identifier = supervisor
directory = /tmp
nocleanup = true
childlogdir = /home/john.wang/tmp
strip_ansi = false[inet_http_server]
port=127.0.0.1:9001[unix_http_server]
file=/home/john.wang/tmp/supervisor.sock[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface[supervisorctl]
serverurl = unix:///home/john.wang/tmp/supervisor.sock
username = john.wang
password = none
prompt = mysupervisor[program:test]
command=echo 123000 #命令
directory=/home/john.wang/workspace/ #工作路径
redirect_stderr=true #输出流判定
stdout_logfile=/home/john.wang/logs/sp/test.log #日志文件
启动
supervisord -c /etc/supervisord.conf
管理
supervisorctl Actions
Print a list of available actions
help <action>
Print help for <action>
add <name> [...]
Activates any updates in config for process/group
remove <name> [...]
Removes process/group from active config
update
Reload config and then add and remove as necessary (restarts programs)
clear <name>
Clear a process’ log files.
clear <name> <name>
Clear multiple process’ log files
clear all
Clear all process’ log files
fg <process>
Connect to a process in foreground mode Press Ctrl+C to exit foreground
pid
Get the PID of supervisord.
pid <name>
Get the PID of a single child process by name.
pid all
Get the PID of every child process, one per line.
reread
Reload the daemon’s configuration files, without add/remove (no restarts)
restart <name>
Restart a process Note: restart does not reread config files. For that, see reread and update.
restart <gname>:*
Restart all processes in a group Note: restart does not reread config files. For that, see reread and update.
restart <name> <name>
Restart multiple processes or groups Note: restart does not reread config files. For that, see reread and update.
restart all
Restart all processes Note: restart does not reread config files. For that, see reread and update.
signal
No help on signal
start <name>
Start a process
start <gname>:*
Start all processes in a group
start <name> <name>
Start multiple processes or groups
start all
Start all processes
status
Get all process status info.
status <name>
Get status on a single process by name.
status <name> <name>
Get status on multiple named processes.
stop <name>
Stop a process
stop <gname>:*
Stop all processes in a group
stop <name> <name>
Stop multiple processes or groups
stop all
Stop all processes
tail [-f] <name> [stdout|stderr] (default stdout)
Output the last part of process logs Ex: tail -f <name> Continuous tail of named process stdout Ctrl-C to exit. tail -100 <name> last 100 bytes of process stdout tail <name> stderr last 1600 bytes of process stderr
supervisor备忘相关推荐
- vim的一些快捷键,备忘
vim的一些快捷键,备忘 快捷键 作用 ctrl+g ...
- 资源 | AI、神经网络、机器学习、深度学习以及大数据学习备忘单
向AI转型的程序员都关注了这个号☝☝☝ 以下是关于神经网络.机器学习.深度学习以及大数据学习的备忘单,其中部分内容和此前发布的<资源 | 值得收藏的 27 个机器学习的小抄>有所重复,大家 ...
- 机器学习项目的备忘清单!
↑↑↑关注后"星标"Datawhale 每日干货 & 每月组队学习,不错过 Datawhale干货 作者:Harshit Tyagi,编译:机器之心 机器学习项目中含有众多 ...
- 备忘:C语言void *
由于研究一段代码的时候,看到了 void *.故此进行了学习. 看了 http://www.doc88.com/p-894907672962.html 的说明,感觉写得太好了,已无话可说. 故此备忘 ...
- [译] Kotlin 标准方法备忘
原文地址:Kotlin Standard Functions cheat-sheet 原文作者:Jose Alcérreca 译文出自:掘金翻译计划 本文永久链接:github.com/xitu/go ...
- Nancy之结合TinyFox调试备忘
原文:Nancy之结合TinyFox调试备忘 最近把一个小项目的数据库换成MongoDB,同时用了MongoRepository 这个开源组件来对数据进行操作. 通过NuGet安装之后,它会自动在we ...
- CSP浏览器安全策略备忘
挺久之前过了一遍CSP的安全策略,很多人把它喻为XSS攻击的终结者,因为这种策略不再像传统只靠各种正则和特征匹配来识别跨站攻击Payload,而是直接从协议层把一些存在安全隐患的用法默认给干掉了,把同 ...
- Cheat—— 给Linux初学者和管理员一个终极命令行备忘单
当你不确定你所运行的命令,尤其是那些使用了许多选项的复杂命令时,你会怎么做?在这种情况下,我们使用man pages来获取帮助.还有一些其它的选择可能包括像'help','whereis'和'what ...
- 简单备忘一下Linux下的wget和curl如何使用http proxy
简单备忘一下Linux下的wget和curl如何使用http proxy wget -e "http_proxy=porxyhost:port" www.baidu.com cur ...
- (网页的缓存控制)HTML配置no-cache(备忘) “Cache-control”常见的取值
HTML配置no-cache(备忘) No-cache配置 html表头如下 <meta http-equiv="Content-Type" content="te ...
最新文章
- 这是一份不完整的数据竞赛年鉴
- 大数据小项目之电视收视率企业项目04--完全分布式搭建
- 积分背后的数字货币,你真的会玩吗?
- c语言最小元素下标怎么看,查找最小的k个元素 (C语言代码)
- Feed43自定义 RSS 订阅源
- nginx js、css多个请求合并为一个请求(concat模块)
- mfc中句柄与指针的区别
- 网络工具之GNS3安装及使用
- 【大数据技术干货】(还不懂数仓,数据中心?看这一篇就够了!)在实际的开发生产中,让你了解企业级数据中心整体架构(DB+ETL+ODS+DW+DM)的各个层次的过程详解,数据联系及功能区分
- 图像识别毕业设计 人脸识别与疲劳检测系统设计与实现 - python opencv
- Android Studio3.5及使用AndroidX的一些坑
- react-native-calendars的使用
- compact php,如何使用php compact()函数
- 【生活记录】[2020年]上海居转户流程
- [docker]privileged参数
- DC 视频教程 第十课
- java判断一个字符串是否为需要的格式日期格式
- VS编译器中光标由竖线变为方格(方块)解决办法(笔记本)
- bootstrap 实现商城布局
- 不可见字符​​​“​\u200b“的坑