66
www.obarun.org
66-svctl
This command is used to control an already supervised services in live defined in 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 in live defined in the given tree and an already running scandir.
This tool only deal with 'classic' service—see 66-dbctl for other kind of services.
Multiple services can be handled by seperating their names with a space. 66-svctl gathers the service(s) passed as argument 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.
By default, the timeout is 0, which means that 66-svctl will block 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 effects if a timeout-up (for up signal) or timeout-down (for down signal) was defined
for the given service at the parsing time—see frontend. In such case priority is given to those files.
If the option is not given and the timeout-up,timeout-down files doesn't exist, 1000 is pick by default.
-
-n death : specifies the maximum number of service death events that the supervisor will keep track.
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 effects if a maxdeath was defined for the given service at the parsing time—see frontend.
In such case priority is given to this file. If the option is not given and the max-death-tally files doesn't exist, 3 is pick by default.
-
-u|U : sends a up signal to the service where U asks for readiness notification. In case of U, 66-svctl look after a notification-fd
file—see service startup notifications and frontend.
In such case priority is given to this file. If such file doesn't exist, 66-svctl will change the U to u and warn the user about the change.
-
-d|D : sends a down signal to the service where D asks for readiness notification. In case of D, 66-svctl look after a notification-fd
file—see service startup notifications and frontend.
In such case priority is given to this file. If such file doesn't exist, 66-svctl will change the D to d and warn the user about the change.
Note
You can sends a signal to a 'classic' service with the s6-svc program. s6-svc has the philosophy "launch and forget"
and do not take care of the exit status of the service when a signal is sends. s6-svctl does. Futhermore, the -S and -n allow you to deal directly on the command line with the
timeout-up and timeout-down options even if those files doesn't exist.