summaryrefslogtreecommitdiff
path: root/doc/index.html
blob: 57d1ef15cea98df200dc606b9935f5d1a078bdaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Language" content="en" />
    <title>s6 - skarnet's small supervision suite</title>
    <meta name="Description" content="s6 - skarnet's small supervision suite" />
    <meta name="Keywords" content="s6 unix administration root pipe laurent bercot ska skarnet supervision djb" />
    <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
  </head>
<body>

<p>
<a href="http://skarnet.org/software/">Software</a><br />
<a href="http://skarnet.org/">skarnet.org</a>
</p>

<h1> s6 </h1>

<h2> What is it&nbsp;? </h2>

<p>
 s6 is a small suite of programs for UNIX, designed to allow process supervision
(a.k.a service supervision),
in the line of <a href="http://cr.yp.to/daemontools.html">daemontools</a>
and <a href="http://smarden.org/runit/">runit</a>.
</p>

<p>
 The s6 documentation tries to be complete and self-contained; however,
if you have never heard of process supervision before, you might be
confused at first. See the <a href="#related">related resources</a> section
below for pointers to more resources, and earlier approaches to process
supervision that might help you understand the basics.
</p>

<hr />

<ul>
<li> <a href="why.html">Why another supervision suite?</a> Isn't <a href="http://smarden.org/runit/">runit</a> good enough?</li>
<li> What is <a href="ftrig.html">instant notification</a>? What does the
<a href="libs6/ftrigr.html">ftrigr library</a> do exactly?</li>
<li> How to run a s6-svscan-based supervision tree <a href="s6-svscan-not-1.html">without replacing init</a> </li>
<li> How to <a href="s6-svscan-1.html">replace init</a> </li>
</ul>

<hr />

<h2> Installation </h2>

<h3> Requirements </h3>

<ul>
 <li> A POSIX-compliant system with a standard C development environment </li>
 <li> GNU make, version 4.0 or later </li>
 <li> <a href="http://skarnet.org/software/skalibs/">skalibs</a> version
2.2.1.0 or later </li>
 <li> <a href="http://skarnet.org/software/execline/">execline</a> version
2.0.1.1 or later </li>
</ul>

<h3> Licensing </h3>

<p>
 s6 is free software. It is available under the
<a href="http://opensource.org/licenses/ISC">ISC license</a>.
</p>

<h3> Download </h3>

<ul>
 <li> The current released version of s6 is <a href="s6-2.1.0.0.tar.gz">2.1.0.0</a>. </li>
 <li> Alternatively, you can checkout a copy of the s6 git repository:
<pre> git clone git://git.skarnet.org/s6 </pre> </li>
</ul>

<h3> Compilation </h3>

<ul>
 <li> See the enclosed INSTALL file for installation details. </li>
</ul>

<h3> Upgrade notes </h3>

<ul>
 <li> <a href="upgrade.html">This page</a> lists the differences to be aware of between
the previous versions of s6 and the current one. </li>
</ul>

<hr />

<h2> Reference </h2>

<h3> Commands </h3>

<p>
 All these commands exit 111 if they encounter a temporary error or
hardware error, and
100 if they encounter a permanent error - such as a misuse. Short-lived
commands exit 0 on success.
</p>

<h4> Supervision system </h4>

<p>
 <a href="s6-svscan.html">s6-svscan</a> and <a href="s6-supervise.html">s6-supervise</a>
are the long-lived processes maintaining the supervision tree. Other programs are
a user interface to control those processes and monitor service states.
</p>

<ul>
<li><a href="s6-svscan.html">The <tt>s6-svscan</tt> program</a></li>
<li><a href="s6-svscanctl.html">The <tt>s6-svscanctl</tt> program</a></li>
<li><a href="s6-supervise.html">The <tt>s6-supervise</tt> program</a></li>
<li><a href="s6-svc.html">The <tt>s6-svc</tt> program</a></li>
<li><a href="s6-svok.html">The <tt>s6-svok</tt> program</a></li>
<li><a href="s6-svstat.html">The <tt>s6-svstat</tt> program</a></li>
<li><a href="s6-svwait.html">The <tt>s6-svwait</tt> program</a></li>
<li><a href="s6-svlisten1.html">The <tt>s6-svlisten1</tt> program</a></li>
<li><a href="s6-svlisten.html">The <tt>s6-svlisten</tt> program</a></li>
<li><a href="s6-notifywhenup.html">The <tt>s6-notifywhenup</tt> program</a> </li>
</ul>

<h4> Other daemontools-like utilities </h4>

<p>
 These programs are a rewrite of the corresponding utilities from
<a href="http://cr.yp.to/daemontools.html">daemontools</a>, with
a few extras. The
<a href="s6-log.html">s6-log</a> program is important in itself: it's
a powerful, scriptable, general-purpose filtering and logging tool
that can be used to entirely replace syslogd. It has many more
features than its <a href="http://cr.yp.to/daemontools/multilog.html">multilog</a>
counterpart.
</p>

<ul>
<li><a href="s6-envdir.html">The <tt>s6-envdir</tt> program</a></li>
<li><a href="s6-envuidgid.html">The <tt>s6-envuidgid</tt> program</a></li>
<li><a href="s6-fghack.html">The <tt>s6-fghack</tt> program</a></li>
<li><a href="s6-log.html">The <tt>s6-log</tt> program</a></li>
<li><a href="s6-setlock.html">The <tt>s6-setlock</tt> program</a></li>
<li><a href="s6-setsid.html">The <tt>s6-setsid</tt> program</a></li>
<li><a href="s6-setuidgid.html">The <tt>s6-setuidgid</tt> program</a></li>
<li><a href="s6-applyuidgid.html">The <tt>s6-applyuidgid</tt> program</a></li>
<li><a href="s6-softlimit.html">The <tt>s6-softlimit</tt> program</a></li>
<li><a href="s6-tai64n.html">The <tt>s6-tai64n</tt> program</a></li>
<li><a href="s6-tai64nlocal.html">The <tt>s6-tai64nlocal</tt> program</a></li>
<li><a href="ucspilogd.html">The <tt>ucspilogd</tt> program</a></li>
</ul>

<h4> Fifodir management, notification and subscription </h4>

<p>
These programs are a clean rewrite of the obsolete "pipe-tools" package; they
are now based on a properly designed notification library.
They provide a command-line interface to
<a href="ftrig.html#notification">inter-process notification and
synchronization</a>.
</p>

<ul>
<li><a href="s6-mkfifodir.html">The <tt>s6-mkfifodir</tt> program</a></li>
<li><a href="s6-cleanfifodir.html">The <tt>s6-cleanfifodir</tt> program</a></li>
</ul>
<p>
</p>
<ul>
<li><a href="s6-ftrig-notify.html">The <tt>s6-ftrig-notify</tt> program</a></li>
</ul>
<p>
</p>
<ul>
<li><a href="s6-ftrig-wait.html">The <tt>s6-ftrig-wait</tt> program</a></li>
<li><a href="s6-ftrig-listen1.html">The <tt>s6-ftrig-listen1</tt> program</a></li>
<li><a href="s6-ftrig-listen.html">The <tt>s6-ftrig-listen</tt> program</a></li>
</ul>

<h4> Local service management and access control </h4>

<ul>
<li><a href="s6-ipcclient.html">The <tt>s6-ipcclient</tt> program</a></li>
<li><a href="s6-ipcserver.html">The <tt>s6-ipcserver</tt> program</a></li>
<li><a href="s6-ipcserver-socketbinder.html">The <tt>s6-ipcserver-socketbinder</tt> program</a></li>
<li><a href="s6-ipcserverd.html">The <tt>s6-ipcserverd</tt> program</a></li>
<li><a href="s6-ioconnect.html">The <tt>s6-ioconnect</tt> program</a></li>
</ul>
<p></p>
<ul>
<li><a href="s6-ipcserver-access.html">The <tt>s6-ipcserver-access</tt> program</a></li>
<li><a href="s6-connlimit.html">The <tt>s6-connlimit</tt> program</a></li>
</ul>
<p></p>
<ul>
<li><a href="s6-accessrules-cdb-from-fs.html">The <tt>s6-accessrules-cdb-from-fs</tt> program</a></li>
<li><a href="s6-accessrules-fs-from-cdb.html">The <tt>s6-accessrules-fs-from-cdb</tt> program</a></li>
</ul>

<h4> suidless privilege gain </h4>

<ul>
<li><a href="s6-sudo.html">The <tt>s6-sudo</tt> program</a></li>
<li><a href="s6-sudoc.html">The <tt>s6-sudoc</tt> program</a></li>
<li><a href="s6-sudod.html">The <tt>s6-sudod</tt> program</a></li>
</ul>

<h4> Internal commands </h4>

<ul>
<li><a href="s6-ftrigrd.html">The <tt>s6-ftrigrd</tt> internal program</a></li>
<li><a href="libs6/s6lockd.html">The <tt>s6lockd</tt> internal program</a></li>
<li><a href="libs6/s6lockd-helper.html">The <tt>s6lockd-helper</tt> internal program</a></li>
</ul>


<h3> Libraries </h3>

<ul>
<li><a href="libs6/"><tt>s6/s6.h</tt>, the main entry point</a></li>
<li><a href="libs6/ftrigw.html">The <tt>ftrigw</tt> library interface</a></li>
<li><a href="libs6/ftrigr.html">The <tt>ftrigr</tt> library interface</a></li>
<li><a href="libs6/s6lock.html">The <tt>s6lock</tt> library interface</a></li>
<li><a href="libs6/accessrules.html">The <tt>accessrules</tt> library interface</a></li>
</ul>

<h3> Definitions </h3>

<ul>
<li> What is a <a href="fifodir.html">fifodir</a></li>
<li> What is a <a href="servicedir.html">service directory</a></li>
<li> What is a <a href="scandir.html">scan directory</a></li>
<li> What is a <a href="localservice.html">local service</a></li>
<li> Why are the <a href="ftrig.html">libftrigw and libftrigr</a> needed </li>
</ul>

<hr />

<a name="related">
<h2> Related resources </h2>
</a>

<h3> s6 discussion </h3>

<ul>
 <li> <tt>s6</tt> is discussed on the
<a href="http://www.skarnet.org/lists.html#supervision">supervision</a> mailing-list. </li>
</ul>

<h3> Similar work </h3>

<ul>
 <li> <a href="http://cr.yp.to/daemontools.html">daemontools</a>, the pioneering
process supervision software suite. </li>
 <li> <a href="http://untroubled.org/daemontools-encore/">daemontools-encore</a>,
a derived work from daemontools with enhancements. (Note that although s6 follows
the same naming scheme, the same general design, and many of the same architecture
choices as daemontools, it is still original work, sharing no code at all with
daemontools.) </li>
 <li> <a href="http://smarden.org/runit/">runit</a>, a slightly different
approach to process supervision, with the same goals. </li>
 <li> <a href="http://b0llix.net/perp/">perp</a>, yet another slightly different
approach to process supervision, also with the same goals. </li>
</ul>

<h3> Other init systems </h3>

<ul>
 <li> Felix von Leitner's <a href="http://www.fefe.de/minit/">minit</a> is an
init system for Linux, with process supervision capabilities. </li>
 <li> <a href="http://freshmeat.net/projects/sysvinit/">sysvinit</a> is the
traditional init system for Linux. </li>
 <li> <a href="http://upstart.ubuntu.com/">Upstart</a> is a well-known init system
for Linux, with complete service management, that comes with the Ubuntu
distribution. It includes a coffee machine and the kitchen sink.</li>
 <li> Because Upstart wasn't complex enough, someone came up with
<a href="systemd.html">systemd</a>, which is a problem in its own category. </li>
 <li> The various BSD flavors have their own style of
<a href="http://www.freebsd.org/doc/handbook/boot-init.html">init</a>. </li>
 <li> MacOS X has its own init spaghetti monster called
<a href="http://en.wikipedia.org/wiki/Launchd">launchd</a>. </li>
</ul>

<p>
All-in-one init systems generally feel complex and convoluted, and when most
people find out about the process supervision approach to init systems, they
usually find it much simpler.
<a href="s6-svscan-1.html#stages">There is a good reason for this.</a>
</p>


<h2> Miscellaneous </h2>

<h3> Why "s6"&nbsp;? </h3>

<p>
<strong>s</strong>karnet.org's <strong>s</strong>mall and <strong>s</strong>ecure
<strong>s</strong>upervision <strong>s</strong>oftware <strong>s</strong>uite.
</p>

<p>
 Also, s6 is a nice command name prefix to have: it identifies the origin of the
software, and it's short. Expect more use of s6- in future skarnet.org software
releases. And please avoid using that prefix for your own projects.
</p>

</body>
</html>