s6
Software
skarnet.org
The s6-svscanctl program
s6-svscanctl sends commands to a running s6-svscan
process.
Interface
s6-svscanctl [ -phratszbnNiq0678 ] svscandir
s6-svscanctl sends the given series of commands to the
s6-svscan process monitoring the
svscandir directory, then exits 0. It exits 111 if it cannot send
a command, or 100 if no s6-svscan process is running on svscandir.
Options
- -p : poweroff mode. s6-svscan will exec into
./.s6-svscan/finish poweroff when it is told to terminate.
- -h : Hangup. s6-svscan will send a SIGHUP to all the
maintained s6-supervise processes, then run its finish procedure.
- -r : reboot mode. s6-svscan will exec into
./.s6-svscan/finish reboot when it is told to terminate. This
is s6-svscan's default mode.
- -a : Alarm. s6-svscan will immediately perform a scan
of svscandir to check for services.
- -t : Terminate. s6-svscan will send a
SIGTERM to all the s6-supervise processes supervising a service and a
SIGHUP to all the s6-supervise processes supervising a logger, then run its
finish procedure.
- -s : halt mode. s6-svscan will exec into
./.s6-svscan/finish halt when it is told to terminate.
- -z : destroy zombies. Immediately triggers s6-svscan's
reaper mechanism.
- -b : abort. s6-svscan will exec into its finishing
procedure. It will not kill any of the maintained s6-supervise processes.
- -n : nuke. s6-svscan will kill all the
s6-supervise processes it has launched but that did not match a service
directory last time svscandir was scanned, i.e. it prunes the
supervision tree so that it matches exactly what was in svscandir
at the time of the last scan. A SIGTERM is sent to the s6-supervise processes
supervising services and a SIGHUP is sent to the s6-supervise processes
supervising loggers.
- -N : Really nuke. Does the same thing as -n,
except that SIGTERM is sent to all the relevant s6-supervise processes, even
if they are supervising loggers. That means that the logger processes will
be killed with a SIGTERM instead of being allowed to exit at their own pace.
- -i : Interrupt. Equivalent to -rt : s6-svscan
will terminate in reboot mode.
- -q : Quit. s6-svscan will send all its s6-supervise processes
a SIGTERM, then exec into its finish procedure.
- -0 : Halt. Equivalent to -st : s6-svscan will
terminate in halt mode.
- -6 : Reboot. Equivalent to -i.
- -7 : Poweroff. Equivalent to -pt: s6-svscan will
terminate in poweroff mode.
- -8 : Other. s6-svscan will terminate in "other" mode.
Usage examples
s6-svscanctl -an /service
Updates the process supervision tree
to exactly match the services listed in /service.
s6-svscanctl -6 /service
Orders the s6-svscan process monitoring /service to exit in
reboot mode: all the supervision tree at /service will be terminated,
and s6-svscan will execute into the /service/.s6-svscan/finish
script with the reboot argument.
Internals
s6-svscanctl writes control commands into the svscandir/.s6-svscan/control
FIFO. An s6-svscan process running on svscandir will be listening to this FIFO,
and will read and interpret those commands.