multiwatch(1)
π multiwatch β the manual page (General Commands Manual) π
okay bestie, sit down, grab a strawberry π, because today we're learning about multiwatch. It's a multiwatch(1) situation, it lives in the General Commands Manual, and it is genuinely iconic.
β¨ NAME β¨
multiwatch β forks and watches multiple instances of a program in the same environment π
π¦ SYNOPSIS π¦
multiwatch [options] -- <application> [app arguments]
multiwatch -v
multiwatch --help | -?
like. the whole vibe is: you give it options, then --, then your app and its args. periodt.
πΈ DESCRIPTION πΈ
multiwatch is used to fork and watch multiple FastCGI backends. That's the whole job. She forks, she watches, she supervises. main character energy fr fr π
π OPTIONS π
-f,--forks=childrenβ how many children to fork and watch. default is1. one. just one. slay.-r,--retry=retriesβ how many times you're allowed to retry forking a single child. default is3.-t,--timeout=msecsβ the retry timeout in ms. here's the tea: if the child dies after the timeout, the retry counter gets reset. default is10000 ms = 10 s.-s,--signal=signameβ the signal you send to the children to signal 'graceful' termination. your options areHUP,INT,QUIT,TERM,USR1,USR2, and the default isUSR1.-?,--helpβ general usage instructions π«Ά-v,--versionβ show version and exit. bye π
π SIGNAL HANDLING π
okay this part is lowkey the plot twist so pay attention π
multiwatch will forward the signal USR2. and if it receives HUP, INT, QUIT, TERM or USR1, it will send the signal from --signal to the children. and if it receives another signal from that group, it will forward the signal again. yes, again. it's giving "I said what I said" π
a signal of the group HUP, INT, QUIT, TERM and USR1 tells multiwatch to go into "shutdown" mode β so it won't restart children after receiving it. no take-backs. that's the whole point. π
β EXAMPLE β
spawn 2 rails instances on the same FastCGI socket (and supervise them, obviously):
spawn-fcgi -s /tmp/fastcgi-rails.sock -n -- /usr/bin/multiwatch
-f 2 /home/rails/public/dispatch.fcgi
ate. no crumbs. π₯
π SEE ALSO π
go read it, bestie, it's the sibling. iykyk.
π AUTHOR π
Stefan Buehler <source@stbuehler.de>. thank you for your service, legend π«‘
and that's the whole page, babes π it's from the General Commands Manual, it's multiwatch(1) in the source/version sense, and it's dated September 17, 2010. iconic date, iconic page, we love her. bye bestie, go fork something responsibly πΈβ¨
π¦ where this page comes from
- debian trixie: multiwatch 1.0.1-1 Β· MIT
- ubuntu questing: multiwatch 1.0.1-1
- ubuntu resolute: multiwatch 1.0.1-1build1 Β· MIT
- ubuntu stonking: multiwatch 1.0.1-1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms