s6-svscanctl.html (3678B)
1 <html> 2 <head> 3 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <meta http-equiv="Content-Language" content="en" /> 6 <title>s6: the s6-svscanctl program</title> 7 <meta name="Description" content="s6: the s6-svscanctl program" /> 8 <meta name="Keywords" content="s6 command s6-svscanctl svscan command service" /> 9 <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> 10 </head> 11 <body> 12 13 <p> 14 <a href="index.html">s6</a><br /> 15 <a href="//skarnet.org/software/">Software</a><br /> 16 <a href="//skarnet.org/">skarnet.org</a> 17 </p> 18 19 <h1> The s6-svscanctl program </h1> 20 21 <p> 22 s6-svscanctl sends commands to a running <a href="s6-svscan.html">s6-svscan</a> 23 process. 24 </p> 25 26 <h2> Interface </h2> 27 28 <pre> 29 s6-svscanctl [ -zabhitqnN ] <em>scandir</em> 30 </pre> 31 32 <p> 33 s6-svscanctl sends the given series of commands to the 34 <a href="s6-svscan.html">s6-svscan</a> process monitoring the 35 <em>scandir</em> directory, then exits 0. It exits 111 if it cannot send 36 a command, or 100 if no s6-svscan process is running on <em>scandir</em>. 37 </p> 38 39 <h2> Options </h2> 40 41 <ul> 42 <li> <tt>-z</tt> : destroy zombies. Immediately triggers s6-svscan's 43 reaper mechanism. </li> 44 <li> <tt>-a</tt> : Alarm. s6-svscan will immediately perform a scan 45 of <em>scandir</em> to check for services. </li> 46 <li> <tt>-b</tt> : abort. s6-svscan will exec into its finishing 47 procedure. It will not kill any of the maintained s6-supervise processes, 48 unless a <tt>t</tt> or <tt>q</tt> option is also present before the <tt>b</tt> 49 option in the s6-svscanctl invocation. </li> 50 <li> <tt>-h</tt> : Reload configuration. s6-svscan will perform a scan, 51 and destroy inactive services. Equivalent to <tt>-an</tt>. </li> 52 <li> <tt>-i</tt> : equivalent to <tt>-t</tt> below. </li> 53 <li> <tt>-t</tt> : Terminate. s6-svscan will send a 54 SIGTERM to all the s6-supervise processes supervising a service and a 55 SIGHUP to all the s6-supervise processes supervising a logger, then exec into 56 its finish procedure. This means that services will be brought down but 57 loggers will exit naturally on EOF, and s6-svscan will wait for them to exit 58 before exec'ing into <tt>.s6-svscan/finish</tt> or exiting itself: it's a 59 clean shutdown with no loss of logs. </li> 60 <li> <tt>-q</tt> : Quit. s6-svscan will send all its s6-supervise processes 61 a SIGTERM, then exec into its finish procedure. This is different from <tt>-t</tt> 62 in that services <em>and</em> loggers will be forcibly killed, so the quit 63 procedure may be faster but in-flight logs may be lost. </li> 64 <li> <tt>-n</tt> : nuke. s6-svscan will kill all the 65 s6-supervise processes it has launched but that did not match a service 66 directory last time <em>scandir</em> was scanned, i.e. it prunes the 67 supervision tree so that it matches exactly what was in <em>scandir</em> 68 at the time of the last scan. A SIGTERM is sent to the s6-supervise processes 69 supervising services and a SIGHUP is sent to the s6-supervise processes 70 supervising loggers. </li> 71 <li> <tt>-N</tt> : Really nuke. Does the same thing as <tt>-n</tt>, 72 except that SIGTERM is sent to all the relevant s6-supervise processes, even 73 if they are supervising loggers. This is not recommended in a situation where 74 you do not need to tear down the supervision tree. </li> 75 </ul> 76 77 <h2> Internals </h2> 78 79 <p> 80 s6-svscanctl writes control commands into the <tt><em>scandir</em>/.s6-svscan/control</tt> 81 FIFO. An s6-svscan process running on <em>scandir</em> will be listening to this FIFO, 82 and will read and interpret those commands. 83 </p> 84 85 </body> 86 </html>