Linux系统Supervisor如何管理进程


Linux用户们对超级用户Supervisor肯定不会陌生,我们可以通过Supervisor对电脑上所有的文件卷宗、目录和文件进行管理,今天小编就给大家介绍一个Supervisor进程管理吧。

功能

优点

配置简单

管理精准

进程组管理

RPC扩展

API支持

FastCGI进程管理

事件支持(如定时任务)

缺点

被管理进程必须前台运行

退出后会使被监管的进程也退出

配置

[unix_http_server]

file=/var/run/supervisor.sock

chmod=0700

[supervisord]

logfile=/var/log/supervisor/supervisord.log

pidfile=/var/run/supervisord.pid

childlogdir=/var/log/supervisor

[rpcinterface:supervisor]

supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]

serverurl=unix:///var/run/supervisor.sock

[program:cow]

command=/web/root/bin/cow -rc="/web/root/etc/cow.conf"

autostart=true

autorestart=true

redirect_stderr=true

stderr_logfile=NONE

[include]

files = /etc/supervisor/conf.d/*.conf

操作

supervisorctl status 查看进程状态

supervisorctl reload 重启supervisord

supervisorctl start|stop|restart 启动关闭重启进程


上一篇:Linux Vi编辑代码时语法不能着色如何办?

下一篇:Linux利用PXE安装虚拟机的方法


进程管理 Supervisor
Copyright © 2002-2019 测速网 www.inhv.cn 皖ICP备2023010105号
测速城市 测速地区 测速街道 网速测试城市 网速测试地区 网速测试街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!

热门搜索 城市网站建设 地区网站制作 街道网页设计 大写数字 热点城市 热点地区 热点街道 热点时间 房贷计算器