Supervisor -
Supervisor is a systemd-replacement that we use to run our applications. We use Jonne's Managevisor (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-214941) as a frontend to Supervisor. Supervisor is running on all backends that we serve applications from.
Using Supervisor
Do not run the reload command unless you know what you are doing! This will restart Supervisord and all of the processes that it was running, likely causing a downtime.
supervisorctl - enter supervisorctl and list statuses of all processes, example:
sudo supervisorctl
application1-nightly.attracs.com RUNNING pid 870, uptime 25 days, 22:10:22
attracs-managevisor-agent RUNNING pid 869, uptime 25 days, 22:10:22
auth-nightly.attracs.com RUNNING pid 871, uptime 25 days, 22:10:22
application2-nightly.attracs.com RUNNING pid 872, uptime 25 days, 22:10:22
syncthing RUNNING pid 3325202, uptime 1 day, 23:01:46
help - list all commands, example:
supervisor> help
default commands (type help <topic>):
=====================================
add exit open reload restart start tail
avail fg pid remove shutdown status update
clear maintail quit reread signal stop version
supervisorctl status process-name - lists all matching processes status information, example:
supervisor> status syncthing
syncthing RUNNING pid 3325202, uptime 1 day, 23:01:53
start process-name - starts all matching processes from fatal or stopped state.
restart process-name - restarts all matching processes
stop process-name - stops all matching processes.
tail process-name - tails a small amount of logs
tail -f process-name - doesn't work for some reason. todo fix!
error: unix:///tmp/supervisor.sock/logtail/process-name-here/stdout Cannot read, status code 401
tail -20000 attracs-managevisor-agent - tail 20 000 bytes of a processes logs, both stderr and stdout . Useful for trying to see if the process is listening. Example:
supervisor> tail -20000 attracs-managevisor-agent
OKREADY
RESULT 2
OKREADY
RESULT 2
OKREADY
...
avail - Gives a list of configured processes that are added and that you can add to Supervisor management.
add process-name - Activates any updates in config for matching process/group