Master Supervisord: Install, Configure, and Manage Linux Processes Efficiently
Supervisord, a Python‑based process manager, lets you daemonize non‑daemon applications, automatically restart crashes, and control services via simple commands; this guide covers installation methods, key configuration settings, and essential management commands for reliable Linux operations.
Supervisord is a Python‑implemented process management tool that converts managed applications into daemon processes, allowing start, stop, restart, and automatic restart on crashes, ensuring self‑healing.
Note: Supervisord can only manage non‑daemon processes.
Installation
sudo easy_install supervisordor sudo pip install supervisord or
sudo yum install supervisordNote: The yum default repository provides Supervisord 2.x, which cannot manage child processes spawned by monitored programs, causing issues when restarting them.
Main Configuration
The primary configuration resides in the program: block of /etc/supervisord.conf; other settings (socket, log, etc.) can be adjusted as needed.
sudo vim /etc/supervisord.conf
[program:cc_refresh_inotify]
command=/usr/local/sbin/cc_refresh_inotify.sh
autostart=true
autorestart=true
stopasgroup=true
log_stdout=true
log_stderr=true
logfile=/data/losg/supervisor/cc_refresh_inotify.logBasic Management
supervisord {start|stop|status|restart|reload|force-reload|condrestart}
supervisorctl {start|restart} programxxx – start/stop monitored program
supervisorctl reload – reload new config and restart monitored programs
supervisorctl update – restart programs whose configuration has changed
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
