The s6-svscanctl program
s6-svscanctl sends commands to a running s6-svscan
s6-svscanctl [ -zabhitqnN ] scandir
s6-svscanctl sends the given series of commands to the
s6-svscan process monitoring the
scandir directory, then exits 0. It exits 111 if it cannot send
a command, or 100 if no s6-svscan process is running on scandir.
- -z : destroy zombies. Immediately triggers s6-svscan's
- -a : Alarm. s6-svscan will immediately perform a scan
of scandir to check for services.
- -b : abort. s6-svscan will exec into its finishing
procedure. It will not kill any of the maintained s6-supervise processes,
unless a t or q option is also present before the b
option in the s6-svscanctl invocation.
- -h : Reload configuration. s6-svscan will perform a scan,
and destroy inactive services. Equivalent to -an.
- -i : equivalent to -t below.
- -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 exec into
its finish procedure. This means that services will be brought down but
loggers will exit naturally on EOF, and s6-svscan will wait for them to exit
before exec'ing into .s6-svscan/finish or exiting itself: it's a
clean shutdown with no loss of logs.
- -q : Quit. s6-svscan will send all its s6-supervise processes
a SIGTERM, then exec into its finish procedure. This is different from -t
in that services and loggers will be forcibly killed, so the quit
procedure may be faster but in-flight logs may be lost.
- -n : nuke. s6-svscan will kill all the
s6-supervise processes it has launched but that did not match a service
directory last time scandir was scanned, i.e. it prunes the
supervision tree so that it matches exactly what was in scandir
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
- -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. This is not recommended in a situation where
you do not need to tear down the supervision tree.
s6-svscanctl writes control commands into the scandir/.s6-svscan/control
FIFO. An s6-svscan process running on scandir will be listening to this FIFO,
and will read and interpret those commands.