LinuxCommandLibrary

supervisorctl

Control and monitor supervisor managed processes

TLDR

Show the status of a process (or all processes if process_name is not specified)

$ supervisorctl status [process_name]
copy

Start/stop/restart a process
$ supervisorctl [start|stop|restart] [process_name]
copy

Start/stop/restart all processes in a group
$ supervisorctl [start|stop|restart] [group_name]:*
copy

Show last 100 bytes of process stderr
$ supervisorctl tail -100 [process_name] stderr
copy

Keep displaying stdout of a process
$ supervisorctl tail -f [process_name] stdout
copy

Reload process configuration file to add/remove processes as necessary
$ supervisorctl update
copy

SYNOPSIS

supervisorctl [options] [command [arguments]]

PARAMETERS

-c configfile
    Specify an alternate configuration file. Defaults to supervisord.conf in the current working directory, or /etc/supervisor/supervisord.conf.

-h, --help
    Show program's help message and exit.

-i socket, --interactive
    Start an interactive shell after executing commands.

-s url, --server url
    Specify the URL of the supervisord server. Defaults to http://localhost:9001.

-u username, --username username
    Specify the username for authenticating to the supervisord server.

-p password, --password password
    Specify the password for authenticating to the supervisord server.

start program | group | all
    Start specified program(s).

stop program | group | all
    Stop specified program(s).

restart program | group | all
    Restart specified program(s).

status [program | group | all]
    Show status information for specified program(s).

shutdown
    Shut down the supervisord process.

update
    Reload the configuration file and apply changes.

reload
    Restart the supervisor daemon.

add program
    Add specified program to the config and start it.

remove program
    Remove specified program from the config and stop it.

avail
    List available programs.

exit
    Exit the supervisorctl shell.

help
    Show help message.

DESCRIPTION

supervisorctl is the command-line client for interacting with a supervisord process. It allows you to monitor and control processes managed by Supervisor. You can use it to start, stop, restart, and query the status of these processes.

Supervisor is a process control system that enables you to monitor and control processes on a Unix-like operating system. It simplifies managing long-running services and applications, ensuring they automatically restart upon failure or crash. supervisorctl provides a simple and intuitive way to interact with Supervisor, making process management much easier. It connects to the supervisord process via a Unix domain socket or TCP port, and you can execute commands to manage your applications. Its common usage includes running your program in production and ensuring high availability.

SIGNALS

When a program managed by Supervisor needs to be stopped or restarted, Supervisor sends it a signal. By default, Supervisor sends SIGTERM to the process. This can be configured in the supervisord.conf file.

SEE ALSO

Copied to clipboard