Skip to content

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 ​

bash
# 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 stderr

Specify a config file if supervisorctl cannot find /etc/supervisord.conf (Debian/Ubuntu packages often use /etc/supervisor/supervisord.conf):

bash
supervisorctl -c /etc/supervisor/supervisord.conf status

Complete supervisorctl Command Reference ​

CommandWhat It DoesNotes
supervisorctl status [name|all]Show running state, PID, and uptimeExits 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 rereadReload config files and report changesDoes not add, remove, or restart processes
supervisorctl update [group|all]Reload config, add/remove, restart affectedOnly restarts programs whose config changed
supervisorctl reloadRestart the supervisord daemon itselfRestarts all managed processes
supervisorctl tail [-f] [-<bytes>] <name> [stdout|stderr]Read or follow a process logDefault is last 1600 bytes of stdout (bytes, not lines)
supervisorctl maintail [-f] [-<bytes>]Tail supervisord's own activity logUseful for startup/crash diagnostics
supervisorctl clear <name|all>Clear a process's log files—
supervisorctl fg <name>Attach to process in foregroundPress 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:

  1. restart myapp restarts the process using the old in-memory configuration.
  2. reread then update loads edited configs, shows what changed, and restarts only the affected programs.
  3. reload restarts supervisord itself and bounces every process it manages.

How supervisorctl tail Works ​

Note that supervisorctl tail takes bytes, not lines:

bash
# 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 stderr

Where supervisord Stores Log Files ​

Supervisor maintains two kinds of logs:

  1. Daemon activity log ([supervisord] -> logfile)
    • Default in Supervisor: $CWD/supervisord.log
    • Typical Debian/Ubuntu package path: /var/log/supervisor/supervisord.log
  2. 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's tempfile.gettempdir(), typically /tmp) and deletes those files when supervisord restarts.

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]) ​

ini
[supervisord]
logfile=/var/log/supervisor/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
childlogdir=/var/log/supervisor

Program Log Paths and Rotation ([program:myapp]) ​

ini
[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 KeyDefaultNotes
logfile$CWD/supervisord.logDaemon activity log path
logfile_maxbytes50MBMax size before rotating (KB, MB, GB); 0 = unlimited
logfile_backups10Number of rotated backups to keep; 0 = keep none
childlogdirSystem temp dirDirectory for AUTO child logs
stdout_logfile / stderr_logfileAUTOExplicit path, AUTO, or NONE
stdout_logfile_maxbytes / stderr_logfile_maxbytes50MBMax size before rotating; must be 0 for /dev/stdout or /dev/stderr
stdout_logfile_backups / stderr_logfile_backups10Number of rotated backups to keep
redirect_stderrfalseWhen true, sends stderr to stdout_logfile

Two official Supervisor caveats:

  • Containers (/dev/stdout): If you point logfile, stdout_logfile, or stderr_logfile at 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_logfile or stderr_logfile while rotation is enabled, or the log file will be corrupted.

After editing the config, apply it cleanly with:

bash
supervisorctl reread
supervisorctl update

View 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:

bash
# 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-read

Need to combine multiple supervisorctl tail -f streams from different processes into one browser UI? Use Logdy's socket and forward modes:

bash
# 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 8124

Logdy 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.