]>
Commit | Line | Data |
---|---|---|
9e632bf7 LP |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | ||
5 | <!-- | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2010 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation; either version 2 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | --> | |
23 | ||
24 | <refentry id="systemd"> | |
25 | ||
26 | <refentryinfo> | |
27 | <title>systemd</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Lennart</firstname> | |
34 | <surname>Poettering</surname> | |
35 | <email>lennart@poettering.net</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>systemd</refentrytitle> | |
160cd5c9 | 42 | <manvolnum>1</manvolnum> |
9e632bf7 LP |
43 | </refmeta> |
44 | ||
45 | <refnamediv> | |
46 | <refname>systemd</refname> | |
6f6083dc | 47 | <refname>init</refname> |
9e632bf7 LP |
48 | <refpurpose>systemd System and Session Manager</refpurpose> |
49 | </refnamediv> | |
50 | ||
2218198b LP |
51 | <refsynopsisdiv> |
52 | <cmdsynopsis> | |
160cd5c9 | 53 | <command>systemd <arg choice="opt" rep="repeat">OPTIONS</arg></command> |
2218198b LP |
54 | </cmdsynopsis> |
55 | <cmdsynopsis> | |
160cd5c9 | 56 | <command>init <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command> |
2218198b LP |
57 | </cmdsynopsis> |
58 | </refsynopsisdiv> | |
59 | ||
9e632bf7 LP |
60 | <refsect1> |
61 | <title>Description</title> | |
62 | ||
2218198b LP |
63 | <para>systemd is a system and session manager for |
64 | Linux operating systems. When run as first process on | |
af62c704 KS |
65 | boot (as PID 1), it acts as init system that brings |
66 | up and maintains userspace services.</para> | |
2218198b | 67 | |
af62c704 | 68 | <para>For compatibility with SysV, if systemd is called |
2218198b | 69 | as <command>init</command> and a PID that is not |
af62c704 | 70 | 1, it will execute <command>telinit</command> and pass |
2218198b LP |
71 | all command line arguments unmodified. That means |
72 | <command>init</command> and <command>telinit</command> | |
73 | are mostly equivalent when invoked from normal login sessions. See | |
74 | <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
75 | for more information.</para> | |
76 | </refsect1> | |
77 | ||
78 | <refsect1> | |
79 | <title>Options</title> | |
80 | ||
81 | <para>The following options are understood:</para> | |
82 | ||
83 | <variablelist> | |
84 | <varlistentry> | |
160cd5c9 LP |
85 | <term><option>-h</option></term> |
86 | <term><option>--help</option></term> | |
2218198b LP |
87 | |
88 | <listitem><para>Prints a short help | |
89 | text and exits.</para></listitem> | |
90 | </varlistentry> | |
91 | <varlistentry> | |
92 | <term><option>--unit=</option></term> | |
93 | ||
94 | <listitem><para>Set default unit to | |
95 | activate on startup. If not specified | |
96 | defaults to | |
97 | <filename>default.target</filename>.</para></listitem> | |
98 | </varlistentry> | |
99 | <varlistentry> | |
100 | <term><option>--running-as=</option></term> | |
101 | ||
102 | <listitem><para>Tell systemd to run in | |
103 | a particular mode. Argument is one of | |
104 | <option>system</option>, | |
105 | <option>session</option>. Normally it | |
106 | should not be necessary to pass this | |
107 | option, as systemd automatically | |
108 | detects the mode it is started | |
109 | in. This call is hence of little use | |
110 | except for | |
111 | debugging.</para></listitem> | |
112 | </varlistentry> | |
113 | <varlistentry> | |
114 | <term><option>--test</option></term> | |
115 | ||
116 | <listitem><para>Determine startup | |
117 | sequence, dump it and exit. This is an | |
118 | option useful for debugging | |
119 | only.</para></listitem> | |
120 | </varlistentry> | |
121 | <varlistentry> | |
122 | <term><option>--dump-configuration-items</option></term> | |
123 | ||
124 | <listitem><para>Dump understood unit | |
125 | configuration items. This outputs a | |
7874bcd6 LP |
126 | terse but complete list of |
127 | configuration items understood in unit | |
128 | definition files.</para></listitem> | |
2218198b LP |
129 | </varlistentry> |
130 | <varlistentry> | |
131 | <term><option>--confirm-spawn</option></term> | |
132 | ||
133 | <listitem><para>Ask for confirmation when spawning processes.</para></listitem> | |
134 | </varlistentry> | |
135 | <varlistentry> | |
136 | <term><option>--introspect=</option></term> | |
137 | ||
138 | <listitem><para>Extract D-Bus | |
139 | interface introspection data. This is | |
436c44a5 | 140 | mostly useful at build at install time |
2218198b LP |
141 | to generate data suitable for the |
142 | D-Bus interfaces | |
143 | repository. Optionally the interface | |
144 | name for the introspection data may be | |
af62c704 | 145 | specified. If omitted, the |
2218198b LP |
146 | introspection data for all interfaces |
147 | is dumped.</para></listitem> | |
148 | </varlistentry> | |
149 | <varlistentry> | |
150 | <term><option>--log-level=</option></term> | |
151 | ||
152 | <listitem><para>Set log level. As | |
153 | argument this accepts a numerical log | |
154 | level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
155 | symbolic names (lowercase): | |
156 | <option>emerg</option>, | |
157 | <option>alert</option>, | |
158 | <option>crit</option>, | |
159 | <option>err</option>, | |
160 | <option>warning</option>, | |
161 | <option>notice</option>, | |
162 | <option>info</option>, | |
163 | <option>debug</option>.</para></listitem> | |
164 | </varlistentry> | |
165 | <varlistentry> | |
166 | <term><option>--log-target=</option></term> | |
167 | ||
168 | <listitem><para>Set log | |
169 | target. Argument must be one of | |
170 | <option>console</option>, | |
171 | <option>syslog</option>, | |
172 | <option>kmsg</option>, | |
173 | <option>syslog-or-kmsg</option>, | |
174 | <option>null</option>.</para></listitem> | |
175 | </varlistentry> | |
176 | <varlistentry> | |
177 | <term><option>--log-color=</option></term> | |
178 | ||
179 | <listitem><para>Highlight important | |
180 | log messages. Argument is a boolean | |
181 | value. If the argument is omitted it | |
182 | defaults to | |
183 | <option>true</option>.</para></listitem> | |
184 | </varlistentry> | |
185 | <varlistentry> | |
186 | <term><option>--log-location=</option></term> | |
187 | ||
188 | <listitem><para>Include code location | |
189 | in log messages. This is mostly | |
190 | relevant for debugging | |
191 | purposes. Argument is a boolean | |
192 | value. If the argument is omitted | |
193 | it defaults to | |
194 | <option>true</option>.</para></listitem> | |
195 | </varlistentry> | |
2218198b LP |
196 | </variablelist> |
197 | </refsect1> | |
198 | ||
99ffae46 LP |
199 | <refsect1> |
200 | <title>Concepts</title> | |
201 | ||
202 | <para>systemd provides a dependency system between | |
203 | various entities called "units". Units encapsulate | |
204 | various objects that are relevant for system boot-up | |
205 | and maintainance. The majority of units are configured | |
206 | in unit configuration files, whose syntax and basic | |
207 | set of options is described in | |
208 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
209 | however some are created automatically from other | |
210 | configuration or dynamically from system state. Units | |
211 | may be active (meaning started, bound, plugged in, ... | |
212 | depending on the unit type), or inactive (meaning | |
213 | stopped, unbound, unplugged, ...), as well is in the | |
214 | process of being activated or deactivated, | |
215 | i.e. between the two states. The following unit types | |
216 | are available:</para> | |
217 | ||
218 | <orderedlist> | |
219 | <listitem><para>Service units, which control | |
220 | daemons and the processes they consist of. For | |
221 | details see | |
222 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
223 | ||
224 | <listitem><para>Socket units, which | |
225 | encapsulate local IPC or network sockets in | |
226 | the system, useful for socket-based | |
227 | activation. For details about socket units see | |
228 | <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
229 | for details on socket-based activation and | |
230 | other forms of activation, see | |
231 | <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para></listitem> | |
232 | ||
233 | <listitem><para>Target units are useful to | |
234 | group units, or provide well-known | |
235 | synchronization points during boot-up, see | |
236 | <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
237 | ||
238 | <listitem><para>Device units expose kernel | |
239 | devices in systemd and may be used to | |
240 | implement device-based activation. For details | |
241 | see | |
242 | <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
243 | ||
244 | <listitem><para>Mount units control mount | |
245 | points in the file system, for details see | |
246 | <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
247 | ||
248 | <listitem><para>Automount units provide | |
249 | automount capabilities, for on-demand mounting | |
250 | of file systems as well as parallelized | |
251 | boot-up. See | |
252 | <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
253 | ||
254 | <listitem><para>Snapshot units can be used to | |
255 | temporarily save the state of the set of | |
256 | systemd units, which later may be restored by | |
257 | activating the saved snapshot unit. For more | |
258 | information see | |
259 | <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
260 | ||
261 | <listitem><para>Timer units are useful for | |
262 | triggering activation of other units based on | |
263 | timers. You may find details in | |
264 | <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
265 | ||
266 | <listitem><para>Swap units are very similar to | |
267 | mount units and encapsulated memory swap | |
268 | partitions or files of the operating | |
269 | systemd. They are described in <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
270 | ||
271 | <listitem><para>Path units may be used | |
272 | activate other services when file system | |
273 | objects change or are modified. See | |
274 | <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para></listitem> | |
275 | ||
276 | </orderedlist> | |
277 | ||
278 | <para>Units are named as their configuration | |
279 | files. Some units have special semantics. A detailed | |
280 | list you may find in | |
281 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> | |
282 | ||
283 | <para>On boot systemd activates the target unit | |
284 | <filename>default.target</filename> whose job it is to | |
285 | activate on-boot services and other on-boot units by | |
286 | pulling them in via dependencies. Usually the unit | |
287 | name is just an alias (symlink) for either | |
288 | <filename>graphical.target</filename> (for | |
289 | fully-featured boots into the UI) or | |
290 | <filename>multi-user.target</filename> (for limited | |
291 | console-only boots for use in embedded or server | |
292 | environments, or similar; a subset of | |
293 | graphical.target). However it is at the discretion of | |
294 | the administrator to configure it as an alias to any | |
295 | other target unit. See | |
296 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
297 | for details about these target units.</para> | |
298 | ||
59a3e1bc LP |
299 | <para>Processes systemd spawns ared placed in |
300 | individual Linux control groups named after the unit | |
301 | which they belong to in the private systemd | |
302 | hierarchy. (see <ulink | |
303 | url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink> | |
304 | for more information about control groups, or short | |
305 | "cgroups"). systemd uses this to effectively keep | |
306 | track of processes. Control group information is | |
307 | maintained in the kernel, and is accessible via the | |
308 | file system hierarchy (beneath | |
309 | <filename>/cgroup/systemd/</filename>), or in tools | |
310 | such as | |
311 | <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
312 | (<command>ps xawf -eo pid,user,cgroup,args</command> | |
313 | is particularly useful to list all processes and the | |
314 | systemd units they belong to.).</para> | |
315 | ||
316 | <para>systemd is compatible with the SysV init system | |
317 | to a large degree: SysV init scripts are supported and | |
318 | simply read as an alternative (though limited) | |
319 | configuration file format. The SysV | |
320 | <filename>/dev/initctl</filename> interface is | |
321 | provided, and comaptibility implementations of the | |
322 | various SysV client tools available. In addition to | |
323 | that various established Unix functionality such as | |
324 | <filename>/etc/fstab</filename> or the | |
325 | <filename>utmp</filename> database are | |
326 | supported.</para> | |
327 | ||
328 | <para>systemd has a minimal transaction system: if a | |
329 | unit is requested to start up or shut down it will add | |
330 | it and all its dependencies to a temporary | |
331 | transaction. Then, it will verify if the transaction | |
332 | is consistent (i.e. whether the ordering of all units | |
333 | is cycle-free). If it is not, systemd will try to fix | |
334 | it up, and removes non-essential jobs from the | |
335 | transaction that might remove the loop. Also, systemd | |
336 | tries to suppress non-essential jobs in the | |
337 | transaction that would stop a running service. Finally | |
338 | it is checked whether the jobs of the transaction | |
339 | contradict jobs that have already been queued, and | |
340 | optionally the transaction is aborted then. If all | |
341 | worked out and the transaction is consistent and | |
342 | minimized in its impact it is merged with all already | |
343 | outstanding jobs and added to the run | |
344 | queue. Effectively this means that before executing a | |
345 | requested operation, systemd will verify that it makes | |
346 | sense, fixing it if possible, and only failing if it | |
347 | really cannot work.</para> | |
348 | ||
349 | <para>Systemd contains native implementations of | |
350 | various tasks that need to be executed as part of the | |
351 | boot process. For example, it sets the host name or | |
352 | configures the loopback network device. It also sets | |
353 | up and mounts various API file systems, such as | |
354 | <filename>/sys</filename> or | |
355 | <filename>/proc</filename>.</para> | |
356 | ||
99ffae46 LP |
357 | <para>For more information about the concepts and |
358 | ideas behind systemd please refer to the <ulink | |
359 | url="http://0pointer.de/blog/projects/systemd.html">Original | |
59a3e1bc | 360 | Design Document</ulink>.</para> |
99ffae46 LP |
361 | </refsect1> |
362 | ||
160cd5c9 LP |
363 | <refsect1> |
364 | <title>Directories</title> | |
7874bcd6 LP |
365 | |
366 | <variablelist> | |
367 | <varlistentry> | |
368 | <term>System unit directories</term> | |
369 | ||
370 | <listitem><para>The systemd system | |
371 | manager reads unit configuration from | |
372 | various directories. Packages that | |
373 | want to install unit files shall place | |
374 | them in the directory returned by | |
375 | <command>pkg-config systemd | |
376 | --variable=systemdsystemunitdir</command>. Other | |
377 | directories checked are | |
378 | <filename>/usr/local/share/systemd/system</filename> | |
379 | and | |
380 | <filename>/usr/share/systemd/system</filename>. User | |
381 | configuration always takes | |
382 | precedence. <command>pkg-config | |
383 | systemd | |
384 | --variable=systemdsystemconfdir</command> | |
385 | returns the path of the system | |
386 | configuration directory. Packages | |
af62c704 KS |
387 | should alter the content of these directories |
388 | only with the | |
7874bcd6 LP |
389 | <citerefentry><refentrytitle>systemd-install</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
390 | tool.</para></listitem> | |
391 | </varlistentry> | |
392 | </variablelist> | |
393 | ||
394 | <variablelist> | |
395 | <varlistentry> | |
396 | <term>Session unit directories</term> | |
397 | ||
398 | <listitem><para>Similar rules apply | |
399 | for the session unit | |
400 | directories. However, here the <ulink | |
401 | url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG | |
402 | Base Directory specification</ulink> | |
403 | is followed to find | |
404 | units. Applications should place their | |
405 | unit files in the directory returned | |
406 | by <command>pkg-config systemd | |
407 | --variable=systemdsessionunitdir</command>. Global | |
408 | configuration is done in the | |
409 | directory reported by | |
410 | <command>pkg-config systemd | |
411 | --variable=systemdsessionconfdir</command>. The | |
412 | <citerefentry><refentrytitle>systemd-install</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
413 | tool can handle both global (i.e. for | |
414 | all users) and private (for one user) | |
415 | enabling/disabling of | |
416 | units.</para></listitem> | |
417 | </varlistentry> | |
418 | </variablelist> | |
419 | ||
420 | <variablelist> | |
421 | <varlistentry> | |
422 | <term>SysV init scripts directory</term> | |
423 | ||
424 | <listitem><para>The location of the | |
425 | SysV init script directory varies | |
426 | between distributions. If systemd | |
427 | cannot find a native unit file for a | |
af62c704 | 428 | requested service, it will look for a |
7874bcd6 LP |
429 | SysV init script of the same name |
430 | (with the | |
431 | <filename>.service</filename> suffix | |
432 | removed).</para></listitem> | |
433 | </varlistentry> | |
434 | </variablelist> | |
435 | ||
436 | <variablelist> | |
437 | <varlistentry> | |
438 | <term>SysV runlevel link farm directory</term> | |
439 | ||
440 | <listitem><para>The location of the | |
441 | SysV runlevel link farm directory | |
442 | varies between distributions. systemd | |
443 | will take the link farm into account | |
444 | when figuring out whether a service | |
445 | shall be enabled. Note that a service | |
446 | unit with a native unit configuration | |
447 | file can be started by activating it | |
448 | in the SysV runlevel link | |
449 | farm.</para></listitem> | |
450 | </varlistentry> | |
451 | </variablelist> | |
160cd5c9 LP |
452 | </refsect1> |
453 | ||
454 | <refsect1> | |
7874bcd6 | 455 | <title>Signals</title> |
160cd5c9 LP |
456 | |
457 | <variablelist> | |
458 | <varlistentry> | |
7874bcd6 LP |
459 | <term>SIGTERM</term> |
460 | ||
461 | <listitem><para>Upon receiving this | |
462 | signal the systemd system manager | |
463 | serializes its state, reexecutes | |
464 | itself and deserializes the saved | |
465 | state again. This is mostly equivalent | |
466 | to <command>systemctl | |
467 | daemon-reexec</command>.</para> | |
468 | ||
469 | <para>systemd session managers will | |
470 | start the | |
471 | <filename>exit.target</filename> unit | |
472 | when this signal is received. This is | |
473 | mostly equivalent to | |
474 | <command>systemctl --session start | |
475 | exit.target</command>.</para></listitem> | |
476 | </varlistentry> | |
477 | ||
478 | <varlistentry> | |
479 | <term>SIGINT</term> | |
480 | ||
481 | <listitem><para>Upon receiving this | |
482 | signal the systemd system manager will | |
483 | start the | |
484 | <filename>ctrl-alt-del.target</filename> unit. This | |
485 | is mostly equivalent to | |
486 | <command>systemctl start | |
487 | ctl-alt-del.target</command>.</para> | |
488 | ||
489 | <para>systemd session managers | |
490 | treat this signal the same way as | |
491 | SIGTERM.</para></listitem> | |
492 | </varlistentry> | |
493 | ||
494 | <varlistentry> | |
495 | <term>SIGWINCH</term> | |
496 | ||
497 | <listitem><para>When this signal is | |
498 | received the systemd system manager | |
499 | will start the | |
500 | <filename>kbrequest.target</filename> | |
501 | unit. This is mostly equivalent to | |
502 | <command>systemctl start | |
503 | kbrequest.target</command>.</para> | |
504 | ||
505 | <para>This signal is ignored by | |
506 | systemd session | |
507 | managers.</para></listitem> | |
508 | </varlistentry> | |
509 | ||
510 | <varlistentry> | |
511 | <term>SIGPWR</term> | |
512 | ||
513 | <listitem><para>When this signal is | |
514 | received the systemd manager | |
515 | will start the | |
516 | <filename>sigpwr.target</filename> | |
517 | unit. This is mostly equivalent to | |
518 | <command>systemctl start | |
519 | sigpwr.target</command>.</para></listitem> | |
520 | </varlistentry> | |
521 | ||
522 | <varlistentry> | |
523 | <term>SIGUSR1</term> | |
524 | ||
525 | <listitem><para>When this signal is | |
526 | received the systemd manager will try | |
527 | to reconnect to the D-Bus | |
528 | bus.</para></listitem> | |
529 | </varlistentry> | |
530 | ||
531 | <varlistentry> | |
532 | <term>SIGUSR2</term> | |
533 | ||
534 | <listitem><para>When this signal is | |
535 | received the systemd manager will log | |
536 | its complete state in human readable | |
537 | form. The data logged is the same as | |
538 | printed by <command>systemctl | |
539 | dump</command>.</para></listitem> | |
540 | </varlistentry> | |
541 | ||
542 | <varlistentry> | |
543 | <term>SIGHUP</term> | |
544 | ||
545 | <listitem><para>Reloads the complete | |
546 | daemon configuration. This is mostly | |
547 | equivalent to <command>systemctl | |
548 | daemon-reload</command>.</para></listitem> | |
549 | </varlistentry> | |
550 | ||
551 | <varlistentry> | |
552 | <term>SIGRTMIN+0</term> | |
553 | ||
554 | <listitem><para>Enters default mode, starts the | |
555 | <filename>default.target</filename> | |
556 | unit. This is mostly equivalent to | |
557 | <command>systemctl start | |
558 | default.target</command>.</para></listitem> | |
559 | </varlistentry> | |
560 | ||
561 | <varlistentry> | |
562 | <term>SIGRTMIN+1</term> | |
563 | ||
564 | <listitem><para>Enters rescue mode, | |
565 | starts the | |
566 | <filename>rescue.target</filename> | |
567 | unit. This is mostly equivalent to | |
568 | <command>systemctl isolate | |
569 | rescue.target</command>.</para></listitem> | |
570 | </varlistentry> | |
160cd5c9 | 571 | |
7874bcd6 LP |
572 | <varlistentry> |
573 | <term>SIGRTMIN+2</term> | |
574 | ||
575 | <listitem><para>Enters emergency mode, | |
576 | starts the | |
577 | <filename>emergency.service</filename> | |
578 | unit. This is mostly equivalent to | |
579 | <command>systemctl isolate | |
580 | emergency.service</command>.</para></listitem> | |
581 | </varlistentry> | |
582 | ||
583 | <varlistentry> | |
584 | <term>SIGRTMIN+3</term> | |
585 | ||
586 | <listitem><para>Halts the machine, | |
587 | starts the | |
588 | <filename>halt.target</filename> | |
589 | unit. This is mostly equivalent to | |
590 | <command>systemctl start | |
591 | halt.target</command>.</para></listitem> | |
592 | </varlistentry> | |
593 | ||
594 | <varlistentry> | |
595 | <term>SIGRTMIN+4</term> | |
596 | ||
597 | <listitem><para>Powers off the machine, | |
598 | starts the | |
599 | <filename>poweroff.target</filename> | |
600 | unit. This is mostly equivalent to | |
601 | <command>systemctl start | |
602 | poweroff.target</command>.</para></listitem> | |
603 | </varlistentry> | |
604 | ||
605 | <varlistentry> | |
606 | <term>SIGRTMIN+5</term> | |
607 | ||
608 | <listitem><para>Reboots the machine, | |
609 | starts the | |
610 | <filename>reboot.target</filename> | |
611 | unit. This is mostly equivalent to | |
612 | <command>systemctl start | |
613 | reboot.target</command>.</para></listitem> | |
160cd5c9 LP |
614 | </varlistentry> |
615 | </variablelist> | |
616 | </refsect1> | |
617 | ||
7874bcd6 LP |
618 | <refsect1> |
619 | <title>Environment</title> | |
620 | ||
621 | <variablelist> | |
622 | <varlistentry> | |
623 | <term><varname>$SYSTEMD_LOG_LEVEL</varname></term> | |
624 | <listitem><para>systemd reads the | |
625 | log level from this environment | |
436c44a5 | 626 | variable. This can be overridden with |
7874bcd6 LP |
627 | <option>--log-level=</option>.</para></listitem> |
628 | </varlistentry> | |
629 | ||
630 | <varlistentry> | |
631 | <term><varname>$SYSTEMD_LOG_TARGET</varname></term> | |
632 | <listitem><para>systemd reads the | |
633 | log target from this environment | |
436c44a5 | 634 | variable. This can be overridden with |
7874bcd6 LP |
635 | <option>--log-target=</option>.</para></listitem> |
636 | </varlistentry> | |
637 | ||
638 | <varlistentry> | |
639 | <term><varname>$SYSTEMD_LOG_COLOR</varname></term> | |
640 | <listitem><para>Controls whether | |
641 | systemd highlights important log | |
436c44a5 | 642 | messages. This can be overridden with |
7874bcd6 LP |
643 | <option>--log-color=</option>.</para></listitem> |
644 | </varlistentry> | |
645 | ||
646 | <varlistentry> | |
647 | <term><varname>$SYSTEMD_LOG_LOCATION</varname></term> | |
648 | <listitem><para>Controls whether | |
649 | systemd prints the code location along | |
650 | with log messages. This can be | |
436c44a5 | 651 | overridden with |
7874bcd6 LP |
652 | <option>--log-location=</option>.</para></listitem> |
653 | </varlistentry> | |
654 | ||
655 | <varlistentry> | |
656 | <term><varname>$XDG_CONFIG_HOME</varname></term> | |
657 | <term><varname>$XDG_CONFIG_DIRS</varname></term> | |
658 | <term><varname>$XDG_DATA_HOME</varname></term> | |
659 | <term><varname>$XDG_DATA_DIRS</varname></term> | |
660 | ||
661 | <listitem><para>The systemd session | |
662 | manager uses these variables in | |
663 | accordance to the <ulink | |
664 | url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG | |
665 | Base Directory specification</ulink> | |
666 | to find its configuration.</para></listitem> | |
667 | </varlistentry> | |
668 | ||
669 | <varlistentry> | |
670 | <term><varname>$SYSTEMD_UNIT_PATH</varname></term> | |
671 | ||
672 | <listitem><para>Controls where systemd | |
673 | looks for unit | |
674 | files.</para></listitem> | |
675 | </varlistentry> | |
676 | ||
677 | <varlistentry> | |
678 | <term><varname>$SYSTEMD_SYSVINIT_PATH</varname></term> | |
679 | ||
680 | <listitem><para>Controls where systemd | |
681 | looks for SysV init scripts.</para></listitem> | |
682 | </varlistentry> | |
683 | ||
684 | <varlistentry> | |
685 | <term><varname>$SYSTEMD_SYSVRCND_PATH</varname></term> | |
686 | ||
687 | <listitem><para>Controls where systemd | |
688 | looks for SysV init script runlevel link | |
689 | farms.</para></listitem> | |
690 | </varlistentry> | |
691 | ||
692 | <varlistentry> | |
693 | <term><varname>$LISTEN_PID</varname></term> | |
694 | <term><varname>$LISTEN_FDS</varname></term> | |
695 | ||
696 | <listitem><para>Set by systemd for | |
697 | supervised processes during | |
698 | socket-based activation. See | |
699 | <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
700 | for more information. | |
701 | </para></listitem> | |
702 | </varlistentry> | |
703 | ||
704 | <varlistentry> | |
705 | <term><varname>$NOTIFY_SOCKET</varname></term> | |
706 | ||
707 | <listitem><para>Set by systemd for | |
708 | supervised processes for status and | |
709 | start-up completion notification. See | |
710 | <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
711 | for more information. | |
712 | </para></listitem> | |
713 | </varlistentry> | |
714 | </variablelist> | |
715 | </refsect1> | |
160cd5c9 | 716 | |
2218198b LP |
717 | <refsect1> |
718 | <title>Sockets and FIFOs</title> | |
719 | ||
720 | <variablelist> | |
721 | <varlistentry> | |
722 | <term><filename>@/org/freedesktop/systemd1/notify</filename></term> | |
723 | ||
724 | <listitem><para>Daemon status | |
725 | notification socket. This is an AF_UNIX | |
726 | datagram socket in the Linux abstract | |
727 | namespace, and is used to implement | |
728 | the daemon notification logic as | |
729 | implemented by | |
730 | <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem> | |
731 | ||
732 | </varlistentry> | |
733 | ||
734 | <varlistentry> | |
735 | <term><filename>@/org/freedesktop/systemd1/logger</filename></term> | |
736 | ||
737 | <listitem><para>Used internally by the | |
738 | <filename>systemd-logger.service</filename> | |
739 | unit to connect STDOUT and/or STDERR | |
740 | of spawned processes to | |
741 | <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
742 | or the kernel log buffer. This is an | |
743 | AF_UNIX stream socket in the Linux | |
744 | abstract namespace.</para></listitem> | |
745 | </varlistentry> | |
746 | ||
747 | <varlistentry> | |
748 | <term><filename>@/org/freedesktop/systemd1/private</filename></term> | |
749 | ||
750 | <listitem><para>Used internally as | |
751 | communication channel between | |
752 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
753 | and the systemd process. This is an | |
754 | AF_UNIX stream socket in the Linux | |
755 | abstract namespace. This interface is | |
756 | private to systemd and should not be | |
757 | used in external | |
758 | projects.</para></listitem> | |
759 | </varlistentry> | |
760 | ||
761 | <varlistentry> | |
762 | <term><filename>/dev/initctl</filename></term> | |
763 | ||
764 | <listitem><para>Limited compatibility | |
765 | support for the SysV client interface, | |
766 | as implemented by the | |
767 | <filename>systemd-initctl.service</filename> | |
768 | unit. This is a named pipe in the file | |
769 | system. This interface is obsolete and | |
770 | should not be used in new | |
771 | applications.</para></listitem> | |
772 | </varlistentry> | |
773 | </variablelist> | |
9e632bf7 LP |
774 | </refsect1> |
775 | ||
9e632bf7 LP |
776 | <refsect1> |
777 | <title>See Also</title> | |
778 | <para> | |
7874bcd6 LP |
779 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
780 | <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
781 | <citerefentry><refentrytitle>systemd-install</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
782 | <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
9e632bf7 | 783 | <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>, |
7874bcd6 LP |
784 | <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>, |
785 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
786 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
787 | <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
9e632bf7 LP |
788 | </para> |
789 | </refsect1> | |
790 | ||
791 | </refentry> |