aboutsummaryrefslogtreecommitdiffstats
path: root/doc/s6_live.html
blob: 53f335951dfa3822645b7685be48a2d1f3e71df1 (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
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="color-scheme" content="dark light" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Language" content="en" />
    <title>s6-frontend: the s6 live command</title>
    <meta name="Description" content="s6-frontend: the s6 live command" />
    <meta name="Keywords" content="s6 ecosystem supervision service manager user interface init skarnet.org skarnet software live s6-rc" />
    <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
  </head>
<body>

<p>
<a href="s6.html">The s6 command</a><br />
<a href="index.html">s6-frontend</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>

<h1> The <tt>s6 live</tt> command </h1>

<p>
 <tt>s6 live</tt> groups actions that target the live <em>machine state</em>
managed by the <a href="//skarnet.org/software/s6-rc/">s6-rc</a> service manager,
hosted in the <a href="s6.conf.html">configured</a> <em>livedir</em>.
</p>

<p>
 Where <a href="s6_process.html"><tt>s6 process</tt></a> directly targets instances
of services supervised by <a href="//skarnet.org/software/s6/">s6-supervision</a>,
without knowledge of the service manager it can only address longruns. On the
other hand, <tt>s6 live</tt> targets services defined in the current live
database, oneshots as well as longruns, and will always respect the dependency
graph.
</p>

<h2 id="interface"> Interface </h2>

<pre>
     s6 live <em>subcommand</em> [ <em>subcommand_options...</em> ] [ <em>args...</em> ]
</pre>

<ul>
 <li> <tt>s6 l</tt> is accepted as an alias for <tt>s6 live</tt>. </li>
</ul>

<h2 id="subcommands"> Subcommands </h2>

<h3 id="help"> help </h3>

<p>
 <tt>s6 live help</tt> prints a short help message summarizing the options
and usage of the <tt>s6 live</tt> command. It is not as detailed as this page.
</p>

<h3 id="status"> status </h3>

<h4> Interface </h4>

<pre>
     s6 live status [ -e | -E ] [ <em>servicenames...</em> ]
</pre>

<ul>
 <li> <tt>s6 live status <em>servicenames...</em></tt> prints a line
for every s6-rc service listed in <em>servicenames</em>. If <em>servicenames</em>
is empty, then it prints a line for all the services present in the
current live database. </li>
 <li> Every line is: the name of the service, a slash character (<tt>/</tt>),
then <tt>up</tt> or <tt>down</tt> depending on the current state of the service.
 <li> If the output is a terminal or you have specified <tt>--color=yes</tt>
in the generic s6 options, and s6-frontend is built with util-linux support,
then the output is pretty-printed instead of having a slash separate the name
of the service from its state. </li>
</ul>

<h4> Options </h4>

<dl>
<dt> -e, --without-essentials </dt>
<dd> Do not list essential services, which can clutter the display with
irrelevant information and are all supposed to always be up anyway.
This is the default. </dd>

<dt> -E, --with-essentials </dt>
<dd> List all services, including essential ones. </dd>
</dl>

<h3 id="start"> start </h3>

<h4> Interface </h4>

<pre>
     s6 live start [ -n ] [ -t <em>timeout</em> ] <em>servicenames...</em>
</pre>

<ul>
 <li> <tt>s6 live start <em>servicenames...</em></tt> brings up all the services
defined in the current live database and listed by name in <em>servicenames</em>,
as well as their dependencies. </li>
</ul>

<h4> Options </h4>

<dl>
<dt> -n, --dry-run </dt>
<dd> Only print what would be done; do not actually start services. </dd>

<dt> -t <em>timeout</em>, --timeout=<em>timeout</em> </dt>
<dd> If the whole change still hasn't completed after <em>timeout</em>
milliseconds, stop waiting and don't attempt to perform the remaining
transitions. By default, <em>timeout</em> is 0, meaning infinite: the
command can wait forever. </dd>
</dl>

<h3 id="stop"> stop </h3>

<h4> Interface </h4>

<pre>
     s6 live stop [ -n ] [ -t <em>timeout</em> ] <em>servicenames...</em>
</pre>

<ul>
 <li> <tt>s6 live stop <em>servicenames...</em></tt> brings down all the services
defined in the current live database and listed by name in <em>servicenames</em>,
as well as services that depends on them. </li>
</ul>

<h4> Options </h4>

<dl>
<dt> -n, --dry-run </dt>
<dd> Only print what would be done; do not actually stop services. </dd>

<dt> -t <em>timeout</em>, --timeout=<em>timeout</em> </dt>
<dd> If the whole change still hasn't completed after <em>timeout</em>
milliseconds, stop waiting and don't attempt to perform the remaining
transitions. By default, <em>timeout</em> is 0, meaning infinite: the
command can wait forever. </dd>
</dl>

<h3 id="restart"> restart </h3>

<h4> Interface </h4>

<pre>
     s6 live restart [ -W | -w ] [ -t <em>timeout</em> ] [ <em>servicenames...</em> ]
</pre>

<ul>
 <li> <tt>s6 live restart <em>servicenames...</em></tt> first brings down all the services
defined in the current live database and listed by name in <em>servicenames</em>,
as well as services that depends on them; then it brings back up all the services in
<em>servicenames</em>. </li>
 <li> If extra services have been brought down because they depend on a service listed
in <em>servicenames...</em> but are not themselves in that list, they are not brought
back up. </li>
</ul>

<h4> Options </h4>

<dl>
<dt> -n, --dry-run </dt>
<dd> Only print what would be done; do not actually stop or start services. </dd>

<dt> -t <em>timeout</em>, --timeout=<em>timeout</em> </dt>
<dd> If the whole restart still hasn't completed after <em>timeout</em>
milliseconds, stop waiting and don't attempt to perform the remaining
transitions. By default, <em>timeout</em> is 0, meaning infinite: the
command can wait forever. </dd>
</dl>

<h3 id="start-everything"> start-everything </h3>

<h4> Interface </h4>

<pre>
     s6 live start-everything [ -n ] [ -t <em>timeout</em> ] [ -D <em>bundle</em> ]
</pre>

<ul>
 <li> <tt>s6 live start-everything</tt> brings up all the services
defined in the current live database and in the default bundle, i.e.
the bundle of services that are enabled at boot time. </li>
</ul>

<h4> Options </h4>

<dl>
<dt> -n, --dry-run </dt>
<dd> Only print what would be done; do not actually start services. </dd>

<dt> -t <em>timeout</em>, --timeout=<em>timeout</em> </dt>
<dd> If the whole change still hasn't completed after <em>timeout</em>
milliseconds, stop waiting and don't attempt to perform the remaining
transitions. By default, <em>timeout</em> is 0, meaning infinite: the
command can wait forever. </dd>

<dt> -D <em>bundle</em>, --default-bundle=<em>bundle</em> </dt>
<dd> Start the bundle of services named <em>bundle</em> instead.
The default is <tt>default</tt>, possibly overridden by the
<tt>--with-default-bundle</tt> build-time configure option in
<a href="//skarnet.org/software/s6-rc/">s6-rc</a> or
<a href="//skarnet.org/software/s6-frontend/">s6-frontend</a>. </dd>
</dl>

<h3 id="stop-everything"> stop-everything </h3>

<h4> Interface </h4>

<pre>
     s6 live stop-everything [ -n ] [ -e | -E ] [ -t <em>timeout</em> ]
</pre>

<ul>
 <li> <tt>s6 live stop-everything</tt> brings down all the services,
except essential services. This is not the command that can
reboot a machine; for that, check <a href="s6_system.html"><tt>s6 system</tt></a>.</li>
</ul>

<h4> Options </h4>

<dl>
<dt> -n, --dry-run </dt>
<dd> Only print what would be done; do not actually stop services. </dd>

<dt> -e, --without-essentials </dt>
<dd> Do not stop essential services; keep the machine in a state where
it can more or less run and be interacted with, even if in a completely
bare state. This is the default. </dd>

<dt> -E, --with-essentials </dt>
<dd> Also stop essential services. After this command the machine
isn't good for much except a reboot. <code>s6 live stop-everything -E</code>
is the command that should be run right before a shutdown when the
system is not using s6-linux-init. To that end, the line
<code>::shutdown:/usr/bin/s6 live stop-everything -E</code> should be
added to <tt>/etc/inittab</tt>, if that is what the init uses. </dd>

<dt> -t <em>timeout</em>, --timeout=<em>timeout</em> </dt>
<dd> If the whole change still hasn't completed after <em>timeout</em>
milliseconds, stop waiting and don't attempt to perform the remaining
transitions. By default, <em>timeout</em> is 0, meaning infinite: the
command can wait forever. </dd>
</dl>

<h3 id="install"> install </h3>

<h4> Interface </h4>

<pre>
     s6 live install [ -b ] [ -K ] [ -f <em>convfile</em> ] [ --init ]
</pre>

<ul>
 <li> <tt>s6 live install</tt> installs the <em>current working set</em>
of services, that has been crafted and committed via
<a href="s6_set.html"><tt>s6 set</tt></a> commands, replacing the current
live service database. </li>
 <li> The state of services defined in the old live database is preserved as
much as possible, though services that are not defined in the new set are
stopped before the live database is replaced. </li>
</ul>

<h4> Options </h4>

<dl>
<dt> -b, --block </dt>
<dd> Block if something is currently holding the lock on the live service
database. The default is to fail with an error message instead. </dd>

<dt> -K, --keep-old </dt>
<dd> Do not automatically delete the old service database after a successful switch.
Instead, print its path to stdout. </dd>

<dt> -f <em>convfile</em>, --conversion-file=<em>convfile</em> </dt>
<dd> Use <em>convfile</em> as a <a href="//skarnet.org/software/s6-rc/s6-rc-update.html#conversion">conversion file</a> for the underlying
<a href="//skarnet.org/software/s6-rc/s6-rc-update.html">s6-rc-update</a>
invocation. This option should
never be necessary if the services in the stores are properly managed. </dd>

<dt> --init </dt>
<dd>
 Copy the compiled database of the current working set to the place where it
can be booted on, but do not call
<a href="//skarnet.org/software/s6-rc/s6-rc-update.html">s6-rc-update</a>.
This is only useful for a <em>first</em> installation of s6-frontend, before
s6-rc is managing live services. This option should never be used once a reboot
has been performed and the machine is successfully running with s6-rc. </dd>
</dl>

</body>
</html>