The s6 command
s6-frontend
Software
skarnet.org
The s6 process command
s6 process groups actions that target services that are managed
by an instance of s6-svscan
running on the configured scandir.
All commands (other than help) require the services in servicenames...
to be a valid reference to a service directory with an
instance of s6-supervise supervising it.
The point of s6 process is to make it easier to send commands to
supervised services, by not requiring the user to know where the scandir
is or the details of .
Instead of s6-svc -r /run/service/foobar, the user can type
s6 process restart foobar for the same effect.
Interface
s6 process subcommand [ subcommand_options... ] [ args... ]
Subcommands
help
s6 process help prints a short help message summarizing the options
and usage of the s6 process command. It is not as detailed as this page.
kill
Interface
s6 process kill [ -W | -w ] [ -s sig ] [ -t timeout ] servicenames...
- s6 process kill servicenames... sends a signal to every
supervised daemon listed by name in servicenames.
- Note that if the daemon dies as a consequence of receiving the signal,
it will normally be restarted by its supervisor. To kill a daemon and keep it
from restarting you need to use s6 process stop.
Options
- -W, --no-wait
- Exit immediately, do not wait until the daemon has died and the service
has cleaned up. This is the default.
- -w, --wait
- Only exit when the daemon has died and the finish script of the service,
if any, has run.
- -s sig, --signal=sig
- Send signal sig. The default is SIGTERM.
- -t timeout, --timeout=timeout
- Only wait for at most timeout milliseconds; if the daemon still
hasn't died after that time, exit. The default is 0, meaning infinite: the
command can wait forever. This option is only effective when paired with the
--wait option.
status
Interface
s6 process status [ -L | -l ] servicenames...
- s6 process status servicenames... prints a line of
status for every
supervised daemon listed by name in servicenames.
Options
- -L, --without-logs
- Only print the status for /run/service/foobar even if
/run/service/foobar/log exists. This is the default.
- -l, --with-logs
- If a /run/service/foobar/log service directory exists,
also print its status along with the one for /run/service/foobar.
Note that this option has no effect on loggers managed by
s6-rc, e.g. services defined in the store and managed by
s6 live, because these loggers are
treated at separate, independent services. The -l option is
only useful with old-style logged s6 services that are not managed by
s6-rc.
start
Interface
s6 process start [ -P | -p ] [ -W | -w ] [ -t timeout ] servicenames...
- s6 process start servicenames... brings up every
supervised daemon listed by name in servicenames.
Options
- -P, --no-permanent
- Only change the current state of the service, not its default state.
If there is a down file
in /run/service/foobar, then s6 process start foobar will
bring the service up, but it will not be restarted if foobard dies. This
is the default.
- -p, --permanent
- Change the current and default states of the service.
If there is a down file
in /run/service/foobar, then s6 process start foobar will
delete it, and the service will be automatically be restarted
if foobard dies.
- -W, --no-wait
- Exit immediately, do not wait until the service is up.
This is the default.
- -w, --wait
- Only exit when the service is up and (if applicable) ready.
- -t timeout, --timeout=timeout
- Only wait for at most timeout milliseconds; if the daemon still
isn't up and ready after that time, exit. The default is 0, meaning infinite: the
command can wait forever. This option is only effective when paired with the
--wait option.
stop
Interface
s6 process stop [ -P | -p ] [ -W | -w ] [ -t timeout ] servicenames...
- s6 process stop servicenames... brings down every
supervised daemon listed by name in servicenames.
Options
- -P, --no-permanent
- Only change the current state of the service, not its default state.
If there is no down file
in /run/service/foobar, then s6 process stop foobar will
stop the service, but it will still be started whenever its supervisor is started.
This is the default.
- -p, --permanent
- Change the current and default states of the service.
If there is no down file
in /run/service/foobar, then s6 process stop foobar will
create one, and the service will not be automatically started whenever its
supervisor is started.
- -W, --no-wait
- Exit immediately, do not wait until the service is down.
This is the default.
- -w, --wait
- Only exit when the service is down and any cleanups are done.
- -t timeout, --timeout=timeout
- Only wait for at most timeout milliseconds; if the finish script
still isn't done after that time, exit. The default is 0, meaning infinite: the
command can wait forever. This option is only effective when paired with the
--wait option.
restart
Interface
s6 process restart [ -W | -w ] [ -t timeout ] servicenames...
- s6 process restart servicenames... restarts every
supervised daemon listed by name in servicenames. This is achieved by
issuing a stop followed by a start command on the targeted service(s).
Options
- -W, --no-wait
- Exit immediately, do not wait until the service has restarted
This is the default.
- -w, --wait
- Only exit when the new instance of the service is up and (if applicable) ready.
- -t timeout, --timeout=timeout
- Only wait for at most timeout milliseconds; if the service still
hasn't restarted after that time, exit. The default is 0, meaning infinite: the
command can wait forever. This option is only effective when paired with the
--wait option.