chiark / gitweb /
event: move all library calls over to new assert_return() macro
[elogind.git] / man / systemd-system.conf.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <!--
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU Lesser General Public License as published by
13   the Free Software Foundation; either version 2.1 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   Lesser General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24
25 <refentry id="systemd-system.conf">
26         <refentryinfo>
27                 <title>systemd-system.conf</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-system.conf</refentrytitle>
42                 <manvolnum>5</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd-system.conf</refname>
47                 <refname>systemd-user.conf</refname>
48                 <refpurpose>System and session service manager configuration file</refpurpose>
49         </refnamediv>
50
51         <refsynopsisdiv>
52                 <para><filename>/etc/systemd/system.conf</filename></para>
53                 <para><filename>/etc/systemd/user.conf</filename></para>
54         </refsynopsisdiv>
55
56         <refsect1>
57                 <title>Description</title>
58
59                 <para>When run as system instance systemd reads the
60                 configuration file <filename>system.conf</filename>,
61                 otherwise <filename>user.conf</filename>. These
62                 configuration files contain a few settings controlling
63                 basic manager operations.</para>
64
65         </refsect1>
66
67         <refsect1>
68                 <title>Options</title>
69
70                 <para>All options are configured in the
71                 <literal>[Manager]</literal> section:</para>
72
73                 <variablelist class='systemd-directives'>
74
75                         <varlistentry>
76                                 <term><varname>LogLevel=</varname></term>
77                                 <term><varname>LogTarget=</varname></term>
78                                 <term><varname>LogColor=</varname></term>
79                                 <term><varname>LogLocation=</varname></term>
80                                 <term><varname>DumpCore=yes</varname></term>
81                                 <term><varname>CrashShell=no</varname></term>
82                                 <term><varname>ShowStatus=yes</varname></term>
83                                 <term><varname>CrashChVT=1</varname></term>
84                                 <term><varname>DefaultStandardOutput=journal</varname></term>
85                                 <term><varname>DefaultStandardError=inherit</varname></term>
86
87                                 <listitem><para>Configures various
88                                 parameters of basic manager
89                                 operation. These options may be
90                                 overridden by the respective command
91                                 line arguments. See
92                                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
93                                 for details about these command line
94                                 arguments.</para></listitem>
95                         </varlistentry>
96
97                         <varlistentry>
98                                 <term><varname>CPUAffinity=</varname></term>
99
100                                 <listitem><para>Configures the initial
101                                 CPU affinity for the init
102                                 process. Takes a space-separated list
103                                 of CPU indexes.</para></listitem>
104                         </varlistentry>
105
106                         <varlistentry>
107                                 <term><varname>JoinControllers=cpu,cpuacct net_cls,netprio</varname></term>
108
109                                 <listitem><para>Configures controllers
110                                 that shall be mounted in a single
111                                 hierarchy. By default, systemd will
112                                 mount all controllers which are
113                                 enabled in the kernel in individual
114                                 hierarchies, with the exception of
115                                 those listed in this setting. Takes a
116                                 space-separated list of comma-separated
117                                 controller names, in order
118                                 to allow multiple joined
119                                 hierarchies. Defaults to
120                                 'cpu,cpuacct'. Pass an empty string to
121                                 ensure that systemd mounts all
122                                 controllers in separate
123                                 hierarchies.</para>
124
125                                 <para>Note that this option is only
126                                 applied once, at very early boot. If
127                                 you use an initial RAM disk (initrd)
128                                 that uses systemd, it might hence be
129                                 necessary to rebuild the initrd if
130                                 this option is changed, and make sure
131                                 the new configuration file is included
132                                 in it. Otherwise, the initrd might
133                                 mount the controller hierarchies in a
134                                 different configuration than intended,
135                                 and the main system cannot remount
136                                 them anymore.</para></listitem>
137                         </varlistentry>
138
139                         <varlistentry>
140                                 <term><varname>RuntimeWatchdogSec=</varname></term>
141                                 <term><varname>ShutdownWatchdogSec=</varname></term>
142
143                                 <listitem><para>Configure the hardware
144                                 watchdog at runtime and at
145                                 reboot. Takes a timeout value in
146                                 seconds (or in other time units if
147                                 suffixed with <literal>ms</literal>,
148                                 <literal>min</literal>,
149                                 <literal>h</literal>,
150                                 <literal>d</literal>,
151                                 <literal>w</literal>). If
152                                 <varname>RuntimeWatchdogSec=</varname>
153                                 is set to a non-zero value, the
154                                 watchdog hardware
155                                 (<filename>/dev/watchdog</filename>)
156                                 will be programmed to automatically
157                                 reboot the system if it is not
158                                 contacted within the specified timeout
159                                 interval. The system manager will
160                                 ensure to contact it at least once in
161                                 half the specified timeout
162                                 interval. This feature requires a
163                                 hardware watchdog device to be
164                                 present, as it is commonly the case in
165                                 embedded and server systems. Not all
166                                 hardware watchdogs allow configuration
167                                 of the reboot timeout, in which case
168                                 the closest available timeout is
169                                 picked. <varname>ShutdownWatchdogSec=</varname>
170                                 may be used to configure the hardware
171                                 watchdog when the system is asked to
172                                 reboot. It works as a safety net to
173                                 ensure that the reboot takes place
174                                 even if a clean reboot attempt times
175                                 out. By default
176                                 <varname>RuntimeWatchdogSec=</varname>
177                                 defaults to 0 (off), and
178                                 <varname>ShutdownWatchdogSec=</varname>
179                                 to 10min. These settings have no
180                                 effect if a hardware watchdog is not
181                                 available.</para></listitem>
182                         </varlistentry>
183
184                         <varlistentry>
185                                 <term><varname>CapabilityBoundingSet=</varname></term>
186
187                                 <listitem><para>Controls which
188                                 capabilities to include in the
189                                 capability bounding set for PID 1 and
190                                 its children. See
191                                 <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
192                                 for details. Takes a whitespace-separated
193                                 list of capability names as read by
194                                 <citerefentry><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
195                                 Capabilities listed will be included
196                                 in the bounding set, all others are
197                                 removed. If the list of capabilities
198                                 is prefixed with ~, all but the listed
199                                 capabilities will be included, the
200                                 effect of the assignment
201                                 inverted. Note that this option also
202                                 affects the respective capabilities in
203                                 the effective, permitted and
204                                 inheritable capability sets. The
205                                 capability bounding set may also be
206                                 individually configured for units
207                                 using the
208                                 <varname>CapabilityBoundingSet=</varname>
209                                 directive for units, but note that
210                                 capabilities dropped for PID 1 cannot
211                                 be regained in individual units, they
212                                 are lost for good.</para></listitem>
213                         </varlistentry>
214
215                         <varlistentry>
216                                 <term><varname>TimerSlackNSec=</varname></term>
217
218                                 <listitem><para>Sets the timer slack
219                                 in nanoseconds for PID 1 which is then
220                                 inherited to all executed processes,
221                                 unless overridden individually, for
222                                 example with the
223                                 <varname>TimerSlackNSec=</varname>
224                                 setting in service units (for details
225                                 see
226                                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>). The
227                                 timer slack controls the accuracy of
228                                 wake-ups triggered by timers. See
229                                 <citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
230                                 for more information. Note that in
231                                 contrast to most other time span
232                                 definitions this parameter takes an
233                                 integer value in nano-seconds if no
234                                 unit is specified. The usual time
235                                 units are understood
236                                 too.</para></listitem>
237                         </varlistentry>
238
239                         <varlistentry>
240                                 <term><varname>DefaultEnvironment=</varname></term>
241
242                                 <listitem><para>Sets manager
243                                 environment variables passed to all
244                                 executed processes. Takes a
245                                 space-separated list of variable
246                                 assignments. See
247                                 <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
248                                 for details about environment
249                                 variables.</para>
250
251                                 <para>Example:
252
253                                 <programlisting>DefaultEnvironment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting>
254
255                                 Sets three variables
256                                 <literal>VAR1</literal>,
257                                 <literal>VAR2</literal>,
258                                 <literal>VAR3</literal>.</para></listitem>
259                         </varlistentry>
260
261                         <varlistentry>
262                                 <term><varname>DefaultLimitCPU=</varname></term>
263                                 <term><varname>DefaultLimitFSIZE=</varname></term>
264                                 <term><varname>DefaultLimitDATA=</varname></term>
265                                 <term><varname>DefaultLimitSTACK=</varname></term>
266                                 <term><varname>DefaultLimitCORE=</varname></term>
267                                 <term><varname>DefaultLimitRSS=</varname></term>
268                                 <term><varname>DefaultLimitNOFILE=</varname></term>
269                                 <term><varname>DefaultLimitAS=</varname></term>
270                                 <term><varname>DefaultLimitNPROC=</varname></term>
271                                 <term><varname>DefaultLimitMEMLOCK=</varname></term>
272                                 <term><varname>DefaultLimitLOCKS=</varname></term>
273                                 <term><varname>DefaultLimitSIGPENDING=</varname></term>
274                                 <term><varname>DefaultLimitMSGQUEUE=</varname></term>
275                                 <term><varname>DefaultLimitNICE=</varname></term>
276                                 <term><varname>DefaultLimitRTPRIO=</varname></term>
277                                 <term><varname>DefaultLimitRTTIME=</varname></term>
278
279                                 <listitem><para>These settings control
280                                 various default resource limits for
281                                 units. See
282                                 <citerefentry><refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
283                                 for details. Use the string
284                                 <varname>infinity</varname> to
285                                 configure no limit on a specific
286                                 resource. These settings may be
287                                 overridden in individual units
288                                 using the corresponding LimitXXX=
289                                 directives. Note that these resource
290                                 limits are only defaults for units,
291                                 they are not applied to PID 1
292                                 itself.</para></listitem>
293                         </varlistentry>
294                 </variablelist>
295         </refsect1>
296
297         <refsect1>
298                   <title>See Also</title>
299                   <para>
300                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
301                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
302                           <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
303                   </para>
304         </refsect1>
305
306 </refentry>