s6

Mirror/fork of https://skarnet.org/software/s6/
git clone https://ccx.te2000.cz/git/s6
Log | Files | Refs | README | LICENSE

s6-instance-list.html (2047B)


      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-instance-list program</title>
      7     <meta name="Description" content="s6: the s6-instance-list program" />
      8     <meta name="Keywords" content="s6 command s6-instance-list instance dynamic instantiation instanced services list listing" />
      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-instance-list program </h1>
     20 
     21 <p>
     22 s6-instance-list gives a list of all currently created instances of an
     23 <a href="instances.html">instanced service</a>.
     24 </p>
     25 
     26 <h2> Interface </h2>
     27 
     28 <pre>
     29      s6-instance-list <em>servicedir</em>
     30 </pre>
     31 
     32 <ul>
     33  <li> s6-instance-list expects a running, supervised
     34 <a href="instances.html">instanced service</a> in <em>servicedir</em>,
     35 as well as an existing instance of this service named <em>name</em>. </li>
     36  <li> It prints to stdout, one per line, the names of all existing instances of <em>servicedir</em>, i.e.
     37 the ones that have been created and not deleted. It does not matter if the instances are
     38 up or down; if they've been created and not deleted, they're printed. </li>
     39  <li> It exits 0. </li>
     40 </ul>
     41 
     42 <h2> Exit codes </h2>
     43 
     44 <ul>
     45  <li> 0: success </li>
     46  <li> 100: wrong usage </li>
     47  <li> 111: system call failed </li>
     48 </ul>
     49 
     50 <h2> Notes </h2>
     51 
     52 <ul>
     53  <li> The list is unsorted, the instance names are printed in an unspecified order. </li>
     54  <li> You can use s6-instance-list to script commands that handle sets of instances.
     55 For example, to get the status of all the instances of a given service, you could write:
     56 <code> for i in `s6-instance-list <em>service</em>` ; do printf "%s: " $i ; s6-instance-status <em>service</em> $i ; done </code> </li>
     57 </ul>
     58 
     59 </body>
     60 </html>