Supervisor Basic Cheat Sheet

Apr 18, 2023

Related to:: Linux - SysAdmin

These basic commands will help you when managing Supervisor for routine tasks.

- status
- stop all
- start all
- restart all
- reload
supervisorctl status

Status

supervisorctl status
laravel-worker:laravel-worker_00 RUNNING pid 22, uptime 0:06:20
laravel-worker:laravel-worker_01 RUNNING pid 23, uptime 0:06:20
laravel-worker:laravel-worker_02 RUNNING pid 24, uptime 0:06:20
laravel-worker:laravel-worker_03 RUNNING pid 25, uptime 0:06:20

Start, Stop, Restart

supervisorctl stop all
laravel-worker:laravel-worker_00: stopped
laravel-worker:laravel-worker_01: stopped
laravel-worker:laravel-worker_02: stopped
laravel-worker:laravel-worker_03: stopped
 
supervisorctl start all
laravel-worker:laravel-worker_00: started
laravel-worker:laravel-worker_01: started
laravel-worker:laravel-worker_02: started
laravel-worker:laravel-worker_03: started
 
supervisorctl restart all
laravel-worker:laravel-worker_00: stopped
laravel-worker:laravel-worker_01: stopped
laravel-worker:laravel-worker_02: stopped
laravel-worker:laravel-worker_03: stopped
laravel-worker:laravel-worker_00: started
laravel-worker:laravel-worker_01: started
laravel-worker:laravel-worker_02: started
laravel-worker:laravel-worker_03: started

Instead of all you could also use the name of the process and the action will be applied just to it, but I don’t find that useful and prefer to stick to all.

supervisorctl restart laravel-worker:laravel-worker_00
laravel-worker:laravel-worker_00: stopped
laravel-worker:laravel-worker_00: started

To reload Supervisor and its configs and restart all processes

supervisorctl reload
Restarted supervisord

Ref

Graph View