Linux系统Supervisor如何管理进程

Linux系统Supervisor如何管理进程,第1张

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系统的一个Supervisor进程管理了,对Supervisor感兴趣的用户,可以在自己的电脑上尝试下这个进程管理。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5594695.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存