]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-system.conf.xml
test-execute: change log level from error to notice
[thirdparty/systemd.git] / man / systemd-system.conf.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <!--
9 SPDX-License-Identifier: LGPL-2.1+
10
11 This file is part of systemd.
12
13 Copyright 2010 Lennart Poettering
14
15 systemd is free software; you can redistribute it and/or modify it
16 under the terms of the GNU Lesser General Public License as published by
17 the Free Software Foundation; either version 2.1 of the License, or
18 (at your option) any later version.
19
20 systemd is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 Lesser General Public License for more details.
24
25 You should have received a copy of the GNU Lesser General Public License
26 along with systemd; If not, see <http://www.gnu.org/licenses/>.
27 -->
28
29 <refentry id="systemd-system.conf"
30 xmlns:xi="http://www.w3.org/2001/XInclude">
31 <refentryinfo>
32 <title>systemd-system.conf</title>
33 <productname>systemd</productname>
34
35 <authorgroup>
36 <author>
37 <contrib>Developer</contrib>
38 <firstname>Lennart</firstname>
39 <surname>Poettering</surname>
40 <email>lennart@poettering.net</email>
41 </author>
42 </authorgroup>
43 </refentryinfo>
44
45 <refmeta>
46 <refentrytitle>systemd-system.conf</refentrytitle>
47 <manvolnum>5</manvolnum>
48 </refmeta>
49
50 <refnamediv>
51 <refname>systemd-system.conf</refname>
52 <refname>system.conf.d</refname>
53 <refname>systemd-user.conf</refname>
54 <refname>user.conf.d</refname>
55 <refpurpose>System and session service manager configuration files</refpurpose>
56 </refnamediv>
57
58 <refsynopsisdiv>
59 <para><filename>/etc/systemd/system.conf</filename>,
60 <filename>/etc/systemd/system.conf.d/*.conf</filename>,
61 <filename>/run/systemd/system.conf.d/*.conf</filename>,
62 <filename>/usr/lib/systemd/system.conf.d/*.conf</filename></para>
63 <para><filename>/etc/systemd/user.conf</filename>,
64 <filename>/etc/systemd/user.conf.d/*.conf</filename>,
65 <filename>/run/systemd/user.conf.d/*.conf</filename>,
66 <filename>/usr/lib/systemd/user.conf.d/*.conf</filename></para>
67 </refsynopsisdiv>
68
69 <refsect1>
70 <title>Description</title>
71
72 <para>When run as a system instance, systemd interprets the
73 configuration file <filename>system.conf</filename> and the files
74 in <filename>system.conf.d</filename> directories; when run as a
75 user instance, systemd interprets the configuration file
76 <filename>user.conf</filename> and the files in
77 <filename>user.conf.d</filename> directories. These configuration
78 files contain a few settings controlling basic manager
79 operations.</para>
80 </refsect1>
81
82 <xi:include href="standard-conf.xml" xpointer="main-conf" />
83
84 <refsect1>
85 <title>Options</title>
86
87 <para>All options are configured in the
88 <literal>[Manager]</literal> section:</para>
89
90 <variablelist class='systemd-directives'>
91
92 <varlistentry>
93 <term><varname>LogLevel=</varname></term>
94 <term><varname>LogTarget=</varname></term>
95 <term><varname>LogColor=</varname></term>
96 <term><varname>LogLocation=</varname></term>
97 <term><varname>DumpCore=yes</varname></term>
98 <term><varname>CrashChangeVT=no</varname></term>
99 <term><varname>CrashShell=no</varname></term>
100 <term><varname>CrashReboot=no</varname></term>
101 <term><varname>ShowStatus=yes</varname></term>
102 <term><varname>DefaultStandardOutput=journal</varname></term>
103 <term><varname>DefaultStandardError=inherit</varname></term>
104
105 <listitem><para>Configures various parameters of basic manager operation. These options may be overridden by
106 the respective process and kernel command line arguments. See
107 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
108 details.</para></listitem>
109 </varlistentry>
110
111 <varlistentry>
112 <term><varname>CtrlAltDelBurstAction=</varname></term>
113
114 <listitem><para>Defines what action will be performed
115 if user presses Ctrl-Alt-Delete more than 7 times in 2s.
116 Can be set to <literal>reboot-force</literal>, <literal>poweroff-force</literal>,
117 <literal>reboot-immediate</literal>, <literal>poweroff-immediate</literal>
118 or disabled with <literal>none</literal>. Defaults to
119 <literal>reboot-force</literal>.
120 </para></listitem>
121 </varlistentry>
122
123 <varlistentry>
124 <term><varname>CPUAffinity=</varname></term>
125
126 <listitem><para>Configures the initial CPU affinity for the
127 init process. Takes a list of CPU indices or ranges separated
128 by either whitespace or commas. CPU ranges are specified by
129 the lower and upper CPU indices separated by a
130 dash.</para></listitem>
131 </varlistentry>
132
133 <varlistentry>
134 <term><varname>JoinControllers=cpu,cpuacct net_cls,netprio</varname></term>
135
136 <listitem><para>Configures controllers that shall be mounted
137 in a single hierarchy. By default, systemd will mount all
138 controllers which are enabled in the kernel in individual
139 hierarchies, with the exception of those listed in this
140 setting. Takes a space-separated list of comma-separated
141 controller names, in order to allow multiple joined
142 hierarchies. Defaults to 'cpu,cpuacct'. Pass an empty string
143 to ensure that systemd mounts all controllers in separate
144 hierarchies.</para>
145
146 <para>Note that this option is only applied once, at very
147 early boot. If you use an initial RAM disk (initrd) that uses
148 systemd, it might hence be necessary to rebuild the initrd if
149 this option is changed, and make sure the new configuration
150 file is included in it. Otherwise, the initrd might mount the
151 controller hierarchies in a different configuration than
152 intended, and the main system cannot remount them
153 anymore.</para></listitem>
154 </varlistentry>
155
156 <varlistentry>
157 <term><varname>RuntimeWatchdogSec=</varname></term>
158 <term><varname>ShutdownWatchdogSec=</varname></term>
159
160 <listitem><para>Configure the hardware watchdog at runtime and
161 at reboot. Takes a timeout value in seconds (or in other time
162 units if suffixed with <literal>ms</literal>,
163 <literal>min</literal>, <literal>h</literal>,
164 <literal>d</literal>, <literal>w</literal>). If
165 <varname>RuntimeWatchdogSec=</varname> is set to a non-zero
166 value, the watchdog hardware
167 (<filename>/dev/watchdog</filename> or the path specified with
168 <varname>WatchdogDevice=</varname> or the kernel option
169 <varname>systemd.watchdog-device=</varname>) will be programmed
170 to automatically reboot the system if it is not contacted within
171 the specified timeout interval. The system manager will ensure
172 to contact it at least once in half the specified timeout
173 interval. This feature requires a hardware watchdog device to
174 be present, as it is commonly the case in embedded and server
175 systems. Not all hardware watchdogs allow configuration of the
176 reboot timeout, in which case the closest available timeout is
177 picked. <varname>ShutdownWatchdogSec=</varname> may be used to
178 configure the hardware watchdog when the system is asked to
179 reboot. It works as a safety net to ensure that the reboot
180 takes place even if a clean reboot attempt times out. By
181 default <varname>RuntimeWatchdogSec=</varname> defaults to 0
182 (off), and <varname>ShutdownWatchdogSec=</varname> to 10min.
183 These settings have no effect if a hardware watchdog is not
184 available.</para></listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term><varname>WatchdogDevice=</varname></term>
189
190 <listitem><para>Configure the hardware watchdog device that the
191 runtime and shutdown watchdog timers will open and use. Defaults
192 to <filename>/dev/watchdog</filename>. This setting has no
193 effect if a hardware watchdog is not available.</para></listitem>
194 </varlistentry>
195
196 <varlistentry>
197 <term><varname>CapabilityBoundingSet=</varname></term>
198
199 <listitem><para>Controls which capabilities to include in the
200 capability bounding set for PID 1 and its children. See
201 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
202 for details. Takes a whitespace-separated list of capability
203 names as read by
204 <citerefentry project='mankier'><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
205 Capabilities listed will be included in the bounding set, all
206 others are removed. If the list of capabilities is prefixed
207 with ~, all but the listed capabilities will be included, the
208 effect of the assignment inverted. Note that this option also
209 affects the respective capabilities in the effective,
210 permitted and inheritable capability sets. The capability
211 bounding set may also be individually configured for units
212 using the <varname>CapabilityBoundingSet=</varname> directive
213 for units, but note that capabilities dropped for PID 1 cannot
214 be regained in individual units, they are lost for
215 good.</para></listitem>
216 </varlistentry>
217
218 <varlistentry>
219 <term><varname>SystemCallArchitectures=</varname></term>
220
221 <listitem><para>Takes a space-separated list of architecture
222 identifiers. Selects from which architectures system calls may
223 be invoked on this system. This may be used as an effective
224 way to disable invocation of non-native binaries system-wide,
225 for example to prohibit execution of 32-bit x86 binaries on
226 64-bit x86-64 systems. This option operates system-wide, and
227 acts similar to the
228 <varname>SystemCallArchitectures=</varname> setting of unit
229 files, see
230 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
231 for details. This setting defaults to the empty list, in which
232 case no filtering of system calls based on architecture is
233 applied. Known architecture identifiers are
234 <literal>x86</literal>, <literal>x86-64</literal>,
235 <literal>x32</literal>, <literal>arm</literal> and the special
236 identifier <literal>native</literal>. The latter implicitly
237 maps to the native architecture of the system (or more
238 specifically, the architecture the system manager was compiled
239 for). Set this setting to <literal>native</literal> to
240 prohibit execution of any non-native binaries. When a binary
241 executes a system call of an architecture that is not listed
242 in this setting, it will be immediately terminated with the
243 SIGSYS signal.</para></listitem>
244 </varlistentry>
245
246 <varlistentry>
247 <term><varname>TimerSlackNSec=</varname></term>
248
249 <listitem><para>Sets the timer slack in nanoseconds for PID 1,
250 which is inherited by all executed processes, unless
251 overridden individually, for example with the
252 <varname>TimerSlackNSec=</varname> setting in service units
253 (for details see
254 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
255 The timer slack controls the accuracy of wake-ups triggered by
256 system timers. See
257 <citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
258 for more information. Note that in contrast to most other time
259 span definitions this parameter takes an integer value in
260 nano-seconds if no unit is specified. The usual time units are
261 understood too.</para></listitem>
262 </varlistentry>
263
264 <varlistentry>
265 <term><varname>DefaultTimerAccuracySec=</varname></term>
266
267 <listitem><para>Sets the default accuracy of timer units. This
268 controls the global default for the
269 <varname>AccuracySec=</varname> setting of timer units, see
270 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
271 for details. <varname>AccuracySec=</varname> set in individual
272 units override the global default for the specific unit.
273 Defaults to 1min. Note that the accuracy of timer units is
274 also affected by the configured timer slack for PID 1, see
275 <varname>TimerSlackNSec=</varname> above.</para></listitem>
276 </varlistentry>
277
278 <varlistentry>
279 <term><varname>DefaultTimeoutStartSec=</varname></term>
280 <term><varname>DefaultTimeoutStopSec=</varname></term>
281 <term><varname>DefaultRestartSec=</varname></term>
282
283 <listitem><para>Configures the default timeouts for starting
284 and stopping of units, as well as the default time to sleep
285 between automatic restarts of units, as configured per-unit in
286 <varname>TimeoutStartSec=</varname>,
287 <varname>TimeoutStopSec=</varname> and
288 <varname>RestartSec=</varname> (for services, see
289 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
290 for details on the per-unit settings). For non-service units,
291 <varname>DefaultTimeoutStartSec=</varname> sets the default
292 <varname>TimeoutSec=</varname>
293 value. <varname>DefaultTimeoutStartSec=</varname> and
294 <varname>DefaultTimeoutStopSec=</varname> default to
295 90s. <varname>DefaultRestartSec=</varname> defaults to
296 100ms.</para></listitem>
297 </varlistentry>
298
299 <varlistentry>
300 <term><varname>DefaultStartLimitIntervalSec=</varname></term>
301 <term><varname>DefaultStartLimitBurst=</varname></term>
302
303 <listitem><para>Configure the default unit start rate
304 limiting, as configured per-service by
305 <varname>StartLimitIntervalSec=</varname> and
306 <varname>StartLimitBurst=</varname>. See
307 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
308 for details on the per-service settings.
309 <varname>DefaultStartLimitIntervalSec=</varname> defaults to
310 10s. <varname>DefaultStartLimitBurst=</varname> defaults to
311 5.</para></listitem>
312 </varlistentry>
313
314 <varlistentry>
315 <term><varname>DefaultEnvironment=</varname></term>
316
317 <listitem><para>Sets manager environment variables passed to
318 all executed processes. Takes a space-separated list of
319 variable assignments. See
320 <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
321 for details about environment variables.</para>
322
323 <para>Example:
324
325 <programlisting>DefaultEnvironment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting>
326
327 Sets three variables
328 <literal>VAR1</literal>,
329 <literal>VAR2</literal>,
330 <literal>VAR3</literal>.</para></listitem>
331 </varlistentry>
332
333 <varlistentry>
334 <term><varname>DefaultCPUAccounting=</varname></term>
335 <term><varname>DefaultBlockIOAccounting=</varname></term>
336 <term><varname>DefaultMemoryAccounting=</varname></term>
337 <term><varname>DefaultTasksAccounting=</varname></term>
338 <term><varname>DefaultIPAccounting=</varname></term>
339
340 <listitem><para>Configure the default resource accounting settings, as configured per-unit by
341 <varname>CPUAccounting=</varname>, <varname>BlockIOAccounting=</varname>, <varname>MemoryAccounting=</varname>,
342 <varname>TasksAccounting=</varname> and <varname>IPAccounting=</varname>. See
343 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
344 for details on the per-unit settings. <varname>DefaultTasksAccounting=</varname> defaults to on,
345 <varname>DefaultMemoryAccounting=</varname> to &MEMORY_ACCOUNTING_DEFAULT;,
346 the other three settings to off.</para></listitem>
347 </varlistentry>
348
349 <varlistentry>
350 <term><varname>DefaultTasksMax=</varname></term>
351
352 <listitem><para>Configure the default value for the per-unit <varname>TasksMax=</varname> setting. See
353 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
354 for details. This setting applies to all unit types that support resource control settings, with the exception
355 of slice units. Defaults to 15%, which equals 4915 with the kernel's defaults on the host, but might be smaller
356 in OS containers.</para></listitem>
357 </varlistentry>
358
359 <varlistentry>
360 <term><varname>DefaultLimitCPU=</varname></term>
361 <term><varname>DefaultLimitFSIZE=</varname></term>
362 <term><varname>DefaultLimitDATA=</varname></term>
363 <term><varname>DefaultLimitSTACK=</varname></term>
364 <term><varname>DefaultLimitCORE=</varname></term>
365 <term><varname>DefaultLimitRSS=</varname></term>
366 <term><varname>DefaultLimitNOFILE=</varname></term>
367 <term><varname>DefaultLimitAS=</varname></term>
368 <term><varname>DefaultLimitNPROC=</varname></term>
369 <term><varname>DefaultLimitMEMLOCK=</varname></term>
370 <term><varname>DefaultLimitLOCKS=</varname></term>
371 <term><varname>DefaultLimitSIGPENDING=</varname></term>
372 <term><varname>DefaultLimitMSGQUEUE=</varname></term>
373 <term><varname>DefaultLimitNICE=</varname></term>
374 <term><varname>DefaultLimitRTPRIO=</varname></term>
375 <term><varname>DefaultLimitRTTIME=</varname></term>
376
377 <listitem><para>These settings control various default
378 resource limits for units. See
379 <citerefentry><refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
380 for details. The resource limit is possible to specify in two formats,
381 <option>value</option> to set soft and hard limits to the same value,
382 or <option>soft:hard</option> to set both limits individually (e.g. DefaultLimitAS=4G:16G).
383 Use the string <varname>infinity</varname> to
384 configure no limit on a specific resource. The multiplicative
385 suffixes K (=1024), M (=1024*1024) and so on for G, T, P and E
386 may be used for resource limits measured in bytes
387 (e.g. DefaultLimitAS=16G). For the limits referring to time values,
388 the usual time units ms, s, min, h and so on may be used (see
389 <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>
390 for details). Note that if no time unit is specified for
391 <varname>DefaultLimitCPU=</varname> the default unit of seconds is
392 implied, while for <varname>DefaultLimitRTTIME=</varname> the default
393 unit of microseconds is implied. Also, note that the effective
394 granularity of the limits might influence their
395 enforcement. For example, time limits specified for
396 <varname>DefaultLimitCPU=</varname> will be rounded up implicitly to
397 multiples of 1s. These settings may be overridden in individual units
398 using the corresponding LimitXXX= directives. Note that these resource
399 limits are only defaults for units, they are not applied to PID 1
400 itself.</para></listitem>
401 </varlistentry>
402 </variablelist>
403 </refsect1>
404
405 <refsect1>
406 <title>See Also</title>
407 <para>
408 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
409 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
410 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
411 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
412 <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
413 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
414 </para>
415 </refsect1>
416
417 </refentry>