S6-RC-DB(8)

πŸ“¦ version 0.7.0.0, in nixpkgs unstable

πŸ’… NAME

okay so listen up bestie β€” s6-rc-db is literally the tool that analyzes a compiled service database and pulls information out of it. that's the whole gig. it's from the System Manager's Manual (section 8, iykyk) and it's about to be your new fave.


✨ SYNOPSIS ✨

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

like, that's a lot of lines but honestly each one is a bop πŸŽ€


πŸ¦‹ DESCRIPTION

s6-rc-db is your little analyzer bestie: it takes a compiled service database and extracts information from it, then prints it out in a user-friendly format. pretty iconic of it, honestly.

it's an offline tool, meaning you can run it on any compiled service database without actually having a live set of services managed by s6-rc(8). no live services? no problem, she doesn't need them. ✨

but hey β€” if you do have a live set, you can still totally run s6-rc-db on the current database (and that's actually the default!). it won't interfere with your normal service operation. not me being considerate or anything 🫢

s6-rc-db expects to find a compiled service database in compiled; by default it uses the service database used by the live state in live. it reads and parses the compiled database it finds, and depending on its arguments, it prints the requested information to stdout, then exits 0. slay.

🌸 Subcommands

  • s6-rc-db help β€” prints a help message on stdout. the classic.
  • s6-rc-db check β€” 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. it's giving vibe check but for databases πŸ’€
  • s6-rc-db list β€” 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. mystery solved πŸ”₯
  • 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. 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. like opening the bundle and seeing what's inside πŸŽ€
  • s6-rc-db dependencies servicename β€” 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. plot twist ✨

  • s6-rc-db pipeline longrunname β€” prints the longrun service pipeline longrunname is a part of, one producer/consumer pair by line. producers and consumers are separated by a slash /. if longrunname isn't part of a pipeline, only longrunname is printed. main character energy either way πŸ‘‘
  • 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.

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

  • s6-rc-db flags atomicname β€” prints a hexadecimal number that is the list of all binary flags for atomic service atomicname. those binary flags are used by s6-rc-repo(7) commands:
    • Bit 0 is set if there's a flag-essential file in the source directory (or if the "essential" flag was inherited from a bundle). it means the service cannot be downed by normal means: s6-rc -d change atomicname will not work, the -D option to s6-rc(8) is needed. additionally, when importing atomicname in a set, it will automatically be put in the always rx, which means it will always be enabled by default. lowkey ungovernable 😭
    • Bit 1 is set if there's a flag-recommended file in the source directory (or if the "recommended" flag was inherited from a bundle). when importing atomicname in a set, it will automatically be put in the active rx rather than the latent one: unless the user actively makes a change before committing the set, atomicname will be in the default bundle and be started at boot time. she's a joiner 🫢
  • s6-rc-db atomics servicename... β€” 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.
  • s6-rc-db all-dependencies servicename... β€” 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 whole friend group, fr fr.
the list is not topologically sorted. don't come for her about ordering, she said what she said.

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.


πŸ’– OPTIONS πŸ’–

  • -c compiled β€” examine a compiled service database in compiled instead of the current live one. bring your own database bestie.
  • -l live β€” assume the live state is in live. this option is ignored if the -c option has been given. default is /run/s6-rc. the default can be changed at package compilation time, by giving the --livedir=live option to ./configure. customizable, we love to see it πŸŽ€
  • -u β€” for commands that use different data depending on whether it's about bringing the service up or down, select the "up" data (this is the default). this option is ignored when it is irrelevant.
  • -d β€” for commands that use different data depending on whether it's about bringing the service up or down, select the "down" data. this option is ignored when it is irrelevant.
  • -b β€” blocking lock. if the database is currently being used by another program, s6-rc-db will wait until that other program has released its lock on the database, then proceed. by default, s6-rc-db fails with an error message if the database is currently in use. patience is a virtue or whatever 🌸

🌈 EXIT STATUS 🌈

  • 0 β€” success. we ate. πŸ’…
  • 3 β€” identifier not found in service database.
  • 4 β€” invalid or corrupted service database.
  • 5 β€” wrong identifier type for the given command.
  • 100 β€” wrong usage.
  • 111 β€” system call failed.

πŸ¦‹ SEE ALSO

s6-rc-faq(7), s6-rc-overview(7), s6-rc-why(7), s6-rc(8), s6-rc-bundle(8), s6-rc-compile(8), s6-rc-dryrun(8), s6-rc-fdholder-filler(8), s6-rc-format-upgrade(8), s6-rc-init(8), s6-rc-oneshot-run(8), s6-rc-update(8)

this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-rc/s6-rc-db.html β€” go read the source, bestie, it's giving primary source realness 🧚


πŸ‘‘ AUTHORS

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

and that's the whole page, no cap πŸ’œ shoutout to the Debian crew β€” this version is dated January 24, 2026. go forth and s6-rc-db responsibly, bestie πŸ“βœ¨

πŸ“¦ where this page comes from