svscan(8)
π 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
sis at most 255 bytes long, and s/logexists
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 thatsupervise(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 π
supervise(8)svc(8)svok(8)svstat(8)svscanboot(8)readproctitle(8)fghack(8)pgrphack(8)multilog(8)tai64n(8)tai64nlocal(8)setuidgid(8)envuidgid(8)envdir(8)softlimit(8)setlock(8)
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
- debian bookworm: daemontools 1:0.76-8.1 Β· LicenseRef-public-domain
- debian trixie: daemontools 1:0.76-14 Β· LicenseRef-public-domain
- nixpkgs unstable: daemontools 0.76
- ubuntu jammy: daemontools 1:0.76-7
- ubuntu noble: daemontools 1:0.76-10 Β· LicenseRef-public-domain
- ubuntu questing: daemontools 1:0.76-15
- ubuntu resolute: daemontools 1:0.76-15build1 Β· LicenseRef-public-domain
- ubuntu stonking: daemontools 1:0.76-15build1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms