S6-SVSCANCTL(8)

πŸ“¦ version 2.15.1.0, in nixpkgs unstable

πŸ’… s6-svscanctl β€” sending lil love notes to your s6-svscan(8)

okay so real quick, this is the s6-svscanctl page from the System Manager's Manual (section 8, sysadmin girlies rise) and it's genuinely so useful once it clicks, i promise 🫢

✨ SYNOPSIS ✨

s6-svscanctl [-zabhitqnN] scandir

🌸 DESCRIPTION 🌸

So s6-svscanctl is basically the group chat DM-er for your supervision tree πŸ’Œ β€” it sends the given series of commands to the s6-svscan(8) process that's monitoring the scandir directory, and then it dips and exits 0. Slay.

But bestie, listen to the exit codes, they matter:

  • exits 111 if it cannot send a command 😭
  • exits 100 if no s6-svscan(8) process is running on scandir πŸ’€

no cap, that's it. that's the whole vibe.


πŸŽ€ OPTIONS πŸŽ€

  • -a β€” Alarm. s6-svscan(8) will immediately perform a scan of scandir to check for services. like a little "hey u up" ping πŸ‘€
  • -z β€” Destroy zombies. Immediately triggers s6-svscan(8)'s reaper mechanism. bye bye zombie processes, not me sending them to the shadow realm πŸ’€
  • -b β€” Abort. s6-svscan(8) will exec into its finishing procedure. Important detail bestie: it will not kill any of the maintained s6-supervise(8) processes, unless a -t or -q option is also present before the -b option in the s6-svscanctl invocation. so order literally matters here, iykyk πŸ”₯
  • -h β€” Reload configuration. s6-svscan(8) will perform a scan, and destroy inactive services. Equivalent to -an. glow-up for your config ✨
  • -i β€” Equivalent to -t below. that's it, that's the whole thing πŸ’…
  • -t β€” Terminate. s6-svscan(8) will send a SIGTERM to all the s6-supervise(8) processes supervising a service and a SIGHUP to all the s6-supervise(8) processes supervising a logger, then exec into its finish procedure. This means that services will be brought down but loggers will exit naturally on EOF, and s6-svscan(8) will wait for them to exit before exec'ing into .s6-svscan/finish or exiting itself: it's a clean shutdown with no loss of logs. 🀩 literally the respectful breakup option, everyone gets closure and nobody loses their diary entries.
  • -q β€” Quit. s6-svscan(8) will send all its s6-supervise(8) processes a SIGTERM, then exec into its finish procedure. This is different from -t in that services and loggers will be forcibly killed, so the quit procedure may be faster but in-flight logs may be lost. 😭 fast but messy, main character energy with consequences fr fr.
  • -n β€” Nuke. s6-svscan(8) will kill all the s6-supervise(8) processes it has launched but that did not match a service directory last time scandir was scanned β€” i.e. it prunes the supervision tree so that it matches exactly what was in scandir at the time of the last scan. A SIGTERM is sent to the s6-supervise(8) processes supervising services and a SIGHUP is sent to the s6-supervise(8) processes supervising loggers. declutter queen πŸ‘‘
  • -N β€” Really nuke. Does the same thing as -n, except that SIGTERM is sent to all the relevant s6-supervise(8) processes, even if they are supervising loggers. This is not recommended in a situation where you do not need to tear down the supervision tree. 🚨 yeah this one's the nuclear option, please don't just vibe-check it for fun.

🧚 IMPLEMENTATION NOTES 🧚

Under the hood, s6-svscanctl writes control commands into the scandir/.s6-svscan/control FIFO. An s6-svscan(8) process running on scandir will be listening to this FIFO, and will read and interpret those commands. so it's literally just leaving notes in a mailbox that s6-svscan checks constantly πŸ“¬ iconic behavior honestly.


πŸ”₯ SEE ALSO πŸ”₯

s6-notifyoncheck(8), s6-permafailon(8), s6-supervise(8), s6-svc(8), s6-svdt(8), s6-svdt-clear(8), s6-svlisten(8), s6-svlisten1(8), s6-svok(8), s6-svscan(8), s6-svstat(8), s6-svwait(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-svscanctl.html


πŸ‘‘ AUTHORS πŸ‘‘

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

okay and finally, the lil sign-off: this one comes from Debian, dated September 29, 2021 β€” so yeah, it's giving vintage but it still ate πŸ’– go forth and scan responsibly bestie 🌈⭐

πŸ“¦ where this page comes from