supervisorctl Commands Cheat Sheet & Log Configuration Guide
supervisorctl is the command-line client for supervisord, the Supervisor process control system on Linux and UNIX-like systems. You can run it as a one-off command (supervisorctl status)—which exits 0 on success and non-zero on error—or with no arguments to open an interactive shell (help lists all actions).
Essential supervisorctl Commands
# Check status of all managed processes
supervisorctl status
# Start, stop, or restart a process (or group:*, or all)
supervisorctl start myapp
supervisorctl stop myapp
supervisorctl restart myapp
supervisorctl restart all
# Apply config file changes WITHOUT restarting untouched programs
supervisorctl reread
supervisorctl update
# Tail stdout (last 1600 bytes) or follow live
supervisorctl tail myapp
supervisorctl tail -f myapp
# Tail stderr live
supervisorctl tail -f myapp stderrSpecify a config file if
supervisorctlcannot find/etc/supervisord.conf(Debian/Ubuntu packages often use/etc/supervisor/supervisord.conf):bashsupervisorctl -c /etc/supervisor/supervisord.conf status
Complete supervisorctl Command Reference
| Command | What It Does | Notes |
|---|---|---|
supervisorctl status [name|all] | Show running state, PID, and uptime | Exits non-zero if any checked process is not running |
supervisorctl start <name|group:*|all> | Start one process, a group, or all | — |
supervisorctl stop <name|group:*|all> | Stop one process, a group, or all | — |
supervisorctl restart <name|group:*|all> | Restart running process(es) | Does not reread edited config files |
supervisorctl reread | Reload config files and report changes | Does not add, remove, or restart processes |
supervisorctl update [group|all] | Reload config, add/remove, restart affected | Only restarts programs whose config changed |
supervisorctl reload | Restart the supervisord daemon itself | Restarts all managed processes |
supervisorctl tail [-f] [-<bytes>] <name> [stdout|stderr] | Read or follow a process log | Default is last 1600 bytes of stdout (bytes, not lines) |
supervisorctl maintail [-f] [-<bytes>] | Tail supervisord's own activity log | Useful for startup/crash diagnostics |
supervisorctl clear <name|all> | Clear a process's log files | — |
supervisorctl fg <name> | Attach to process in foreground | Press Ctrl+C to detach |
supervisorctl pid [name|all] | Print PID of supervisord or child process(es) | pid alone prints supervisord's PID |
reread + update vs restart vs reload
This is the #1 source of mistakes when editing /etc/supervisor/conf.d/*.conf:
restart myapprestarts the process using the old in-memory configuration.rereadthenupdateloads edited configs, shows what changed, and restarts only the affected programs.reloadrestartssupervisorditself and bounces every process it manages.
How supervisorctl tail Works
Note that supervisorctl tail takes bytes, not lines:
# Last 1600 bytes of stdout (default)
supervisorctl tail myapp
# Last 10000 bytes of stdout
supervisorctl tail -10000 myapp
# Last 1600 bytes of stderr
supervisorctl tail myapp stderr
# Continuous live tail of stdout or stderr (Ctrl+C to exit)
supervisorctl tail -f myapp
supervisorctl tail -f myapp stderrWhere supervisord Stores Log Files
Supervisor maintains two kinds of logs:
- Daemon activity log (
[supervisord]->logfile)- Default in Supervisor:
$CWD/supervisord.log - Typical Debian/Ubuntu package path:
/var/log/supervisor/supervisord.log
- Default in Supervisor:
- Child process logs (
[program:x]->stdout_logfile&stderr_logfile)- Default:
AUTO - When set to
AUTO(or omitted), Supervisor writes temporary files into[supervisord]childlogdir(which defaults to Python'stempfile.gettempdir(), typically/tmp) and deletes those files whensupervisordrestarts.
- Default:
For persistent, predictable logs on a server, always configure explicit paths in your [program:x] section.
Configuring Log Paths and Rotation in supervisord.conf
Supervisor has built-in size-based log rotation for both the daemon activity log and every child process stream.
Daemon Activity Log ([supervisord])
[supervisord]
logfile=/var/log/supervisor/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
childlogdir=/var/log/supervisorProgram Log Paths and Rotation ([program:myapp])
[program:myapp]
command=/usr/local/bin/myapp
autostart=true
autorestart=true
; Persistent stdout and stderr log files
stdout_logfile=/var/log/supervisor/myapp.out.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
stderr_logfile=/var/log/supervisor/myapp.err.log
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=10
; Optional: merge stderr into stdout_logfile
; redirect_stderr=true| Config Key | Default | Notes |
|---|---|---|
logfile | $CWD/supervisord.log | Daemon activity log path |
logfile_maxbytes | 50MB | Max size before rotating (KB, MB, GB); 0 = unlimited |
logfile_backups | 10 | Number of rotated backups to keep; 0 = keep none |
childlogdir | System temp dir | Directory for AUTO child logs |
stdout_logfile / stderr_logfile | AUTO | Explicit path, AUTO, or NONE |
stdout_logfile_maxbytes / stderr_logfile_maxbytes | 50MB | Max size before rotating; must be 0 for /dev/stdout or /dev/stderr |
stdout_logfile_backups / stderr_logfile_backups | 10 | Number of rotated backups to keep |
redirect_stderr | false | When true, sends stderr to stdout_logfile |
Two official Supervisor caveats:
- Containers (
/dev/stdout): If you pointlogfile,stdout_logfile, orstderr_logfileat a non-seekable path like/dev/stdout, you must disable rotation (*_logfile_maxbytes=0).- Shared log files: Two processes must not write to the same
stdout_logfileorstderr_logfilewhile rotation is enabled, or the log file will be corrupted.
After editing the config, apply it cleanly with:
supervisorctl reread
supervisorctl updateView supervisorctl Logs Live in a Browser UI with Logdy
supervisorctl tail -f only follows one stream of one process at a time. When you want to watch stdout and stderr—or multiple Supervisor programs—in one filterable browser table at http://127.0.0.1:8080, pipe them into Logdy:
# Install Logdy (Linux / macOS)
curl https://logdy.dev/install.sh | sh
# or on macOS: brew install logdy
# Pipe a live supervisorctl tail directly into Logdy
supervisorctl tail -f myapp | logdy
# Watch stderr and keep lines visible in your terminal too
supervisorctl tail -f myapp stderr | logdy --fallthrough
# Follow both stdout and stderr files directly (with existing history)
logdy follow /var/log/supervisor/myapp.out.log /var/log/supervisor/myapp.err.log --full-readNeed to combine multiple supervisorctl tail -f streams from different processes into one browser UI? Use Logdy's socket and forward modes:
# Terminal 1: start one Logdy UI listening on two local TCP ports
logdy socket 8123 8124 --port 8080
# Terminal 2: forward worker stdout
supervisorctl tail -f worker | logdy forward 8123
# Terminal 3: forward api stderr
supervisorctl tail -f api stderr | logdy forward 8124Logdy binds to 127.0.0.1:8080 by default and keeps logs locally in memory (up to --max-message-count, default 100000). Add --no-analytics --no-updates (-n -u) to opt out of anonymous telemetry and update checks.
For a dedicated walkthrough of pairing Supervisor with Logdy's UI columns, see Supervisorctl Logs: Tail Output in a Web UI.
Frequently Asked Questions
Why did supervisorctl restart not pick up my config changes?
supervisorctl restart only restarts the process using the configuration already loaded in supervisord. Run supervisorctl reread followed by supervisorctl update so supervisord loads the new file and restarts affected programs.
Why does supervisorctl tail -100 myapp show fewer than 100 lines?
In supervisorctl, the numeric modifier (-100) specifies bytes, not lines. The default without a modifier is the last 1600 bytes. Pass a larger byte count (for example, supervisorctl tail -16384 myapp) or read the underlying stdout_logfile with tail -n 100.
Where do Supervisor logs go if I don't set stdout_logfile?
Supervisor uses AUTO mode and creates temporary files inside [supervisord] childlogdir (defaulting to the system temp directory such as /tmp). Those AUTO files and their backups are deleted whenever supervisord restarts.
How do I check if a process is running in a script or health check?
Use supervisorctl status <name> (or supervisorctl status all). In one-off CLI mode, supervisorctl exits with code 0 when all checked processes are running and non-zero otherwise.
