s6-rc-db is a tool to analyze a compiled service database and extract information from it, and print it in a user-friendly format.
It is an offline tool, i.e. you can run it on any compiled service database without actually having a live set of services managed by s6-rc. However, if you do have a live set, you can still run s6-rc-db on the current database (and it is the default); it won't interfere with your normal service operation.
s6-rc-db help s6-rc-db [ -l live ] [ -c compiled ] [ -b ] check s6-rc-db [ -l live ] [ -c compiled ] [ -b ] list all|services|oneshots|longruns|bundles s6-rc-db [ -l live ] [ -c compiled ] [ -b ] type servicename s6-rc-db [ -l live ] [ -c compiled ] [ -b ] [ -u | -d ] timeout atomicname s6-rc-db [ -l live ] [ -c compiled ] [ -b ] contents bundlename s6-rc-db [ -l live ] [ -c compiled ] [ -b ] [ -u | -d ] dependencies servicename s6-rc-db [ -l live ] [ -c compiled ] [ -b ] pipeline longrunname s6-rc-db [ -l live ] [ -c compiled ] [ -b ] [ -u | -d ] script oneshotname s6-rc-db [ -l live ] [ -c compiled ] [ -b ] flags atomicname s6-rc-db [ -l live ] [ -c compiled ] [ -b ] atomics servicename... s6-rc-db [ -l live ] [ -c compiled ] [ -b ] [ -u | -d ] all-dependencies servicename...
Prints a help message on stdout.
Checks the database consistency. Exits 4 with an error message if it finds a problem, such as a mismatch in the direct and reverse dependency tables, or a dependency cycle.
Lists all services of a given type. This subcommand takes a second subcommand:
Lists everything - atomic services and bundles - contained in the database.
Lists all atomic services.
Lists oneshots.
Lists longruns.
Lists all bundles.
Prints the type of servicename: oneshot, longrun or bundle.
Prints the timeout value, in milliseconds, after which bringing atomicname up or down is considered a failure if the called script still has not succeeded. By default, or if the -u option has been given to s6-rc-db, the timeout for up is printed; the timeout for down is printed instead if the -d option has been given.
Lists the atomic services represented by bundle bundlename.
Prints the list of direct dependencies for servicename. If servicename is a bundle, its set of direct dependencies is the union of the direct dependencies of all the atomic services contained in the bundle.
If the -d option has been given to s6-rc-db, the reverse dependencies are given instead: services that directly depend on servicename, or on one of its components if it is a bundle.
Prints the longrun service pipeline longrunname is a part of, one service per line, producers before consumers. If longrunname isn't part of a pipeline, only longrunname is printed.
Prints the up script for oneshotname, which is an argv, i.e. a Unix command line. Each component of this command line is terminated by a null character, so to print it in a human-readable format, pipe the output into something like xargs -0 echo.
If the -d option has been given to s6-rc-db, the down script is printed instead.
Prints a hexadecimal number that is the list of all binary flags for atomic service atomicname.
Those binary flags are currently unused, but this may change in a future version of s6-rc.
Prints the fully resolved list of services represented by the servicename... arguments, i.e. the union of all atomic services contained in servicename.... Each argument in servicename... can be an atomic service or a bundle.
Prints the list of all atomic services needed to bring up all of the servicename... arguments, with all their dependencies, recursively. In other words: for servicename... to be up, every single service listed in the output will need to be up. The output includes the atomic services represented by the servicename... arguments themselves.
The list is not topologically sorted.
If the -d option has been given to s6-rc-db, the recursive list of reverse dependencies is printed: for servicename... to be down, every single service listed in the output will need to be down.