From a491c627e09aa1149196dd40cb377d181db0580a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 7 Jul 2015 14:39:16 +0000 Subject: - Minor fixes to s6-rc - More doc --- doc/s6-rc-db.html | 151 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 134 insertions(+), 17 deletions(-) (limited to 'doc/s6-rc-db.html') diff --git a/doc/s6-rc-db.html b/doc/s6-rc-db.html index 9a1cf3b..280f98a 100644 --- a/doc/s6-rc-db.html +++ b/doc/s6-rc-db.html @@ -94,41 +94,158 @@ it finds a problem, such as a mismatch in the direct and reverse dependency tables, or a dependency cycle.

+

s6-rc-db list

-

Usage examples

+

+ Lists all services of a given type. This subcommand takes a second subcommand: +

+ +

s6-rc-db list all

+ +

+ Lists everything - atomic services and bundles - contained in the database. +

+ +

s6-rc-db list services

+ +

+ Lists all atomic services. +

+ +

s6-rc-db list oneshots

+ +

+ Lists oneshots. +

+ +

s6-rc-db list longruns

+ +

+ Lists longruns. +

+ +

s6-rc-db list bundles

+ +

+ Lists all bundles. +

+ +

s6-rc-db type servicename

+ +

+ Prints the type of servicename: oneshot, longrun +or bundle. Exits 1 if +servicename is not a valid identifier in the database. +

+ +

s6-rc-db timeout atomicname

+ +

+ 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. Exits 1 if atomicname +isn't a valid atomic service. 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. +

+ +

s6-rc-db contents bundlename

+ +

+ Lists the atomic services represented by bundle bundlename. +Exits 1 if bundlename is not a valid bundle. +

+ +

s6-rc-db dependencies servicename

+ +

+ Prints the list of direct dependencies for servicename. +Exits 1 if servicename isn't a valid identifier. 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. +

+ +

s6-rc-db servicedir longrunname

-
 s6-rc myservicebundle 

- Brings up all the services represented by myservicebundle, -dependencies first. + Prints the service directory for longrun service longrunname; +this value is relative to the scandir. Exits 1 if +longrunname is not a valid longrun.

-
 s6-rc -Sad 
+

s6-rc-db script oneshotname

+ +

+ 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. The command exits 1 if oneshotname +is not a valid oneshot. +

+ +

+ If the -d option has been given to s6-rc-db, the +down script is printed instead. +

+ +

s6-rc-db flags atomicname

+

- Brings down all the services in an orderly manner. This is typically -run at shutdown time. + Prints a hexadecimal number that is the list of all binary flags +for atomic service atomicname. Exits 1 if atomicname +is not a valid atomic service.

-
 s6-rc -Au myservicebundle 

- Prints the names of all atomic services represented by -myservicebundle, as well as everything they depend on. + Those binary flags are currently unused, but this may change in a +future version of s6-rc.

-
 s6-rc -Ad myservicebundle 
+

s6-rc-db atomics servicename...

+

- Prints the names of all atomic services represented by -myservicebundle, as well as everything that depends on them. + 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. If an argument isn't a valid identifier, the command +exits 1.

-
 s6-rc -pun0 myservicebundle 
+

s6-rc-db all-dependencies servicename...

+

- Prints what s6-rc would do to bring the state to just -myservicebundle and its dependencies. + 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. If one of those +arguments isn't a valid identifier, the command exits 1.

+

+ The list is not topologically sorted. +

-

Internals

+

+ 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. +

-- cgit v1.2.3