66
www.obarun.org
66-svctl
This command is used to control an already supervised service at live defined in a tree.
Interface
66-svctl [ -h help ] [ -v verbosity ] [ -l live ] [ -t tree ] [ -T timeout ] [ -S service timeout ] [ -n death ] [ -u|U up ] [ -d|D down ] service(s)
This tool expects to find an already supervised service at live defined in the given tree and an already running scandir.
(!) This tool only deals with 'classic' services—see 66-dbctl for other types of services.
Multiple services can be handled by seperating their names with a space. 66-svctl gathers each of these services in a list called selection.
Options
- -h : prints this help.
-
-v verbosity : increases/decreases
the verbosity of the command. 1(Default): Only print
error messages. 2: Also print warning messages.
3: Also print debugging messages.
-
-l live : changes the supervision directory of service to live. By default this will be /run/66. The default can
also be changed at compile time by passing the --livedir=live
option to ./configure. An existing absolute path is expected and
should be within a writable filesystem - likely a RAM filesystem—see 66-scandir.
-
-t tree : handles the service from
the given tree. This option is mandatory
except if a tree was marked as 'current'—see 66-tree.
-
-T timeout : specifies a general timeout (in milliseconds)
after which 66-svctl will exit 111 with an error message if the selection still hasn't reached the desired state for each service;
defaults to 0 (blocks indefinitely).
-
-S service timeout : specifies a timeout (in milliseconds)
after which 66-svctl will exit 111 with an error message if the services still hasn't reached the desired state.
This option has no effect if a timeout-up (for up signal) or timeout-down (for down signal) was defined
for the given service at parsing time—see frontend.
If this option is not specified and no timeout-up or timeout-down file exists the timeout will default to 1000.
-
-n death : specifies the maximum number of service death events that the supervisor will keep track of.
If the service dies more than this number of times, 66-svctl will exit 111 with an error message if the services still hasn't reached the desired state.
This option has no effect if a maxdeath was defined for the given service at parsing time—see frontend.
If this option is not specified and no max-death-tally file exists the maximum allowed deaths will default to 3.
-
-u|U : sends an up signal to the service. Uppercase U asks for readiness notification and searches for a notification-fd
file—see service startup notifications and frontend.
If this file doesn't exist 66-svctl will automatically change to lowercase u and warn the user about the change.
-
-d|D : sends a down signal to the service. Uppercase D asks for readiness notification and searches for a notification-fd
file—see service startup notifications and frontend.
If this file doesn't exist 66-svctl will automatically change to lowercase d and warn the user about the change.
Note
You can also send a signal in a similar fashion to a 'classic' service with the s6-svc tool which has the philosophy "launch and forget".
In contrast to s6-svctl this does not care for the exit status of the service when a signal is sent.
As an extra convenience the -S and -n options allow you to deal directly on the command line with
timeout-up and timeout-down even if these were not specified explicitely in the services frontend file and no corresponding files exist.