svscan(8)

πŸ“¦
version 0.76 Β· 2 versions
  • 0.76 Β· debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.11 Β· alpine 3.24
, in debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– svscan β€” the girl who never sleeps πŸ’–

okay bestie, welcome to svscan(8) from the System Manager's Manual, and no this is not a drill, she is THE momager of your whole service directory 🌸

✨ NAME ✨

svscan β€” starts and monitors a collection of services πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

svscan [ directory ]

πŸ’… DESCRIPTION πŸ’…

okay so. svscan looks at the current directory and, for every single subdirectory in it, it starts up one supervise(8) process. that's it, that's the job. she's a manager, she's delegating πŸ’β€β™€οΈ

the limit? 1000 subdirectories. that's her ceiling. after that she's like "bestie I cannot" 😭

subdirectory names that start with dots? she skips those entirely. hidden girls stay hidden πŸ™ˆ

also important, like actually important: supervise(8) must be in svscan's path. if it isn't, this whole thing does not work, periodt.


okay now the cute part 🌈. svscan can optionally start a pair of supervise(8) processes β€” one for a subdirectory s, and one for s/log β€” with a pipe running between them πŸŽ€. it does this when:

  • the name s is at most 255 bytes long, and
  • s/log exists
ngl, quick lore drop for the oldheads: in versions 0.70 and below, she did this if s was sticky. different vibe, same girl πŸ’€

also she needs two free descriptors for each pipe, so keep an eye on that.


every five seconds she does a little vibe check on the subdirectories again πŸ”₯:

  • sees a new subdirectory? she starts a new supervise(8) process ✨
  • sees an old subdirectory where the supervise(8) process has exited? she restarts that supervise(8) process πŸ’ͺ
  • in the log case, she reuses the same pipe so that no data is lost. iconic behaviour honestly.

svscan is designed to run forever. like, forever forever. she is the main character and she does not exit πŸ‘‘

if she has trouble creating a pipe, or trouble running supervise(8), she prints a message to stderr and then just… tries again five seconds later. no drama, no quitting, she just gets back up 🫢


and if you hand her a command-line argument directory, she switches to that directory when she starts πŸ“‚. simple as that.

🌟 SEE ALSO 🌟

http://cr.yp.to/daemontools.html πŸ¦‹


and that's the whole page bestie!! it's from the daemontools System Manager's Manual and the little footer at the bottom just says svscan(8) β€” she said her own name on the way out, queen behaviour πŸ’–βœ¨ no cap, go run her, she's literally built to never stop πŸŽ€

πŸ“¦ where this page comes from