]>
Commit | Line | Data |
---|---|---|
f3e219a2 LP |
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 | |
5430f7f2 LP |
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 | |
f3e219a2 LP |
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 | |
5430f7f2 | 19 | Lesser General Public License for more details. |
f3e219a2 | 20 | |
5430f7f2 | 21 | You should have received a copy of the GNU Lesser General Public License |
f3e219a2 LP |
22 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
23 | --> | |
24 | ||
5f9cfd4c | 25 | <refentry id="systemd-system.conf"> |
f3e219a2 | 26 | <refentryinfo> |
5f9cfd4c | 27 | <title>systemd-system.conf</title> |
f3e219a2 LP |
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> | |
5f9cfd4c | 41 | <refentrytitle>systemd-system.conf</refentrytitle> |
f3e219a2 LP |
42 | <manvolnum>5</manvolnum> |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
5f9cfd4c ZJS |
46 | <refname>systemd-system.conf</refname> |
47 | <refname>systemd-user.conf</refname> | |
48 | <refpurpose>System and session service manager configuration file</refpurpose> | |
f3e219a2 LP |
49 | </refnamediv> |
50 | ||
51 | <refsynopsisdiv> | |
4aa6e778 LP |
52 | <para><filename>/etc/systemd/system.conf</filename></para> |
53 | <para><filename>/etc/systemd/user.conf</filename></para> | |
f3e219a2 LP |
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>, | |
af2d49f7 | 61 | otherwise <filename>user.conf</filename>. These |
f3e219a2 LP |
62 | configuration files contain a few settings controlling |
63 | basic manager operations.</para> | |
f3e219a2 LP |
64 | </refsect1> |
65 | ||
66 | <refsect1> | |
67 | <title>Options</title> | |
68 | ||
69 | <para>All options are configured in the | |
70 | <literal>[Manager]</literal> section:</para> | |
71 | ||
ffafe91b | 72 | <variablelist class='systemd-directives'> |
f3e219a2 LP |
73 | |
74 | <varlistentry> | |
75 | <term><varname>LogLevel=</varname></term> | |
76 | <term><varname>LogTarget=</varname></term> | |
77 | <term><varname>LogColor=</varname></term> | |
78 | <term><varname>LogLocation=</varname></term> | |
79 | <term><varname>DumpCore=yes</varname></term> | |
80 | <term><varname>CrashShell=no</varname></term> | |
81 | <term><varname>ShowStatus=yes</varname></term> | |
82 | <term><varname>CrashChVT=1</varname></term> | |
706343f4 | 83 | <term><varname>DefaultStandardOutput=journal</varname></term> |
0a494f1f | 84 | <term><varname>DefaultStandardError=inherit</varname></term> |
f3e219a2 LP |
85 | |
86 | <listitem><para>Configures various | |
87 | parameters of basic manager | |
88 | operation. These options may be | |
5471472d | 89 | overridden by the respective command |
f3e219a2 LP |
90 | line arguments. See |
91 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
92 | for details about these command line | |
93 | arguments.</para></listitem> | |
94 | </varlistentry> | |
95 | ||
1f19a534 OS |
96 | <varlistentry> |
97 | <term><varname>DefaultTimeoutStartSec=</varname></term> | |
98 | <term><varname>DefaultTimeoutStopSec=</varname></term> | |
99 | <term><varname>DefaultRestartSec=</varname></term> | |
100 | ||
101 | <listitem><para>Configures the default | |
102 | time-outs for starting and stopping of | |
103 | units, as well as the default time to | |
63ba209d | 104 | sleep between automatic restarts of |
1f19a534 OS |
105 | units, as configured per-unit in |
106 | <varname>TimeoutStartSec=</varname>, | |
107 | <varname>TimeoutStopSec=</varname> and | |
108 | <varname>RestartSec=</varname> (for | |
63ba209d | 109 | service units, see |
1f19a534 OS |
110 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
111 | for details on the per-unit | |
63ba209d | 112 | settings). For non-service units, |
1f19a534 OS |
113 | <varname>DefaultTimeoutStartSec=</varname> |
114 | sets the default | |
115 | <varname>TimeoutSec=</varname> value. | |
116 | </para></listitem> | |
117 | </varlistentry> | |
118 | ||
f3e219a2 LP |
119 | <varlistentry> |
120 | <term><varname>CPUAffinity=</varname></term> | |
121 | ||
122 | <listitem><para>Configures the initial | |
123 | CPU affinity for the init | |
96d4ce01 | 124 | process. Takes a space-separated list |
f3e219a2 | 125 | of CPU indexes.</para></listitem> |
af2d49f7 | 126 | </varlistentry> |
06d4c99a LP |
127 | |
128 | <varlistentry> | |
7ac80732 | 129 | <term><varname>JoinControllers=cpu,cpuacct net_cls,netprio</varname></term> |
0c85a4f3 LP |
130 | |
131 | <listitem><para>Configures controllers | |
132 | that shall be mounted in a single | |
79640424 | 133 | hierarchy. By default, systemd will |
0c85a4f3 LP |
134 | mount all controllers which are |
135 | enabled in the kernel in individual | |
49f43d5f | 136 | hierarchies, with the exception of |
0c85a4f3 | 137 | those listed in this setting. Takes a |
e9dd9f95 JSJ |
138 | space-separated list of comma-separated |
139 | controller names, in order | |
0c85a4f3 LP |
140 | to allow multiple joined |
141 | hierarchies. Defaults to | |
142 | 'cpu,cpuacct'. Pass an empty string to | |
143 | ensure that systemd mounts all | |
144 | controllers in separate | |
e5e991a1 LP |
145 | hierarchies.</para> |
146 | ||
147 | <para>Note that this option is only | |
148 | applied once, at very early boot. If | |
149 | you use an initial RAM disk (initrd) | |
e9dd9f95 | 150 | that uses systemd, it might hence be |
e5e991a1 LP |
151 | necessary to rebuild the initrd if |
152 | this option is changed, and make sure | |
153 | the new configuration file is included | |
79640424 | 154 | in it. Otherwise, the initrd might |
ab06eef8 | 155 | mount the controller hierarchies in a |
b02a01dc LP |
156 | different configuration than intended, |
157 | and the main system cannot remount | |
158 | them anymore.</para></listitem> | |
0c85a4f3 | 159 | </varlistentry> |
e96d6be7 LP |
160 | |
161 | <varlistentry> | |
162 | <term><varname>RuntimeWatchdogSec=</varname></term> | |
163 | <term><varname>ShutdownWatchdogSec=</varname></term> | |
164 | ||
165 | <listitem><para>Configure the hardware | |
166 | watchdog at runtime and at | |
167 | reboot. Takes a timeout value in | |
168 | seconds (or in other time units if | |
169 | suffixed with <literal>ms</literal>, | |
170 | <literal>min</literal>, | |
171 | <literal>h</literal>, | |
172 | <literal>d</literal>, | |
173 | <literal>w</literal>). If | |
174 | <varname>RuntimeWatchdogSec=</varname> | |
79640424 | 175 | is set to a non-zero value, the |
e96d6be7 LP |
176 | watchdog hardware |
177 | (<filename>/dev/watchdog</filename>) | |
178 | will be programmed to automatically | |
179 | reboot the system if it is not | |
180 | contacted within the specified timeout | |
181 | interval. The system manager will | |
182 | ensure to contact it at least once in | |
183 | half the specified timeout | |
184 | interval. This feature requires a | |
185 | hardware watchdog device to be | |
186 | present, as it is commonly the case in | |
187 | embedded and server systems. Not all | |
188 | hardware watchdogs allow configuration | |
189 | of the reboot timeout, in which case | |
190 | the closest available timeout is | |
191 | picked. <varname>ShutdownWatchdogSec=</varname> | |
192 | may be used to configure the hardware | |
193 | watchdog when the system is asked to | |
194 | reboot. It works as a safety net to | |
195 | ensure that the reboot takes place | |
196 | even if a clean reboot attempt times | |
197 | out. By default | |
198 | <varname>RuntimeWatchdogSec=</varname> | |
199 | defaults to 0 (off), and | |
200 | <varname>ShutdownWatchdogSec=</varname> | |
201 | to 10min. These settings have no | |
202 | effect if a hardware watchdog is not | |
203 | available.</para></listitem> | |
204 | </varlistentry> | |
c93ff2e9 | 205 | |
ec8927ca LP |
206 | <varlistentry> |
207 | <term><varname>CapabilityBoundingSet=</varname></term> | |
208 | ||
209 | <listitem><para>Controls which | |
210 | capabilities to include in the | |
211 | capability bounding set for PID 1 and | |
212 | its children. See | |
213 | <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
e9dd9f95 JSJ |
214 | for details. Takes a whitespace-separated |
215 | list of capability names as read by | |
ec8927ca LP |
216 | <citerefentry><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
217 | Capabilities listed will be included | |
218 | in the bounding set, all others are | |
219 | removed. If the list of capabilities | |
79640424 | 220 | is prefixed with ~, all but the listed |
ec8927ca LP |
221 | capabilities will be included, the |
222 | effect of the assignment | |
223 | inverted. Note that this option also | |
bb31a4ac | 224 | affects the respective capabilities in |
ec8927ca LP |
225 | the effective, permitted and |
226 | inheritable capability sets. The | |
227 | capability bounding set may also be | |
228 | individually configured for units | |
229 | using the | |
230 | <varname>CapabilityBoundingSet=</varname> | |
231 | directive for units, but note that | |
232 | capabilities dropped for PID 1 cannot | |
233 | be regained in individual units, they | |
234 | are lost for good.</para></listitem> | |
235 | </varlistentry> | |
236 | ||
aa0f64ac LP |
237 | <varlistentry> |
238 | <term><varname>TimerSlackNSec=</varname></term> | |
239 | ||
240 | <listitem><para>Sets the timer slack | |
241 | in nanoseconds for PID 1 which is then | |
242 | inherited to all executed processes, | |
bb31a4ac | 243 | unless overridden individually, for |
aa0f64ac LP |
244 | example with the |
245 | <varname>TimerSlackNSec=</varname> | |
246 | setting in service units (for details | |
247 | see | |
248 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>). The | |
249 | timer slack controls the accuracy of | |
250 | wake-ups triggered by timers. See | |
251 | <citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
252 | for more information. Note that in | |
253 | contrast to most other time span | |
254 | definitions this parameter takes an | |
255 | integer value in nano-seconds if no | |
256 | unit is specified. The usual time | |
257 | units are understood | |
258 | too.</para></listitem> | |
259 | </varlistentry> | |
260 | ||
97d0e5f8 UTL |
261 | <varlistentry> |
262 | <term><varname>DefaultEnvironment=</varname></term> | |
263 | ||
78894537 LP |
264 | <listitem><para>Sets manager |
265 | environment variables passed to all | |
266 | executed processes. Takes a | |
267 | space-separated list of variable | |
268 | assignments. See | |
269 | <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
270 | for details about environment | |
271 | variables.</para> | |
97d0e5f8 UTL |
272 | |
273 | <para>Example: | |
97d0e5f8 | 274 | |
78894537 LP |
275 | <programlisting>DefaultEnvironment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting> |
276 | ||
277 | Sets three variables | |
278 | <literal>VAR1</literal>, | |
279 | <literal>VAR2</literal>, | |
280 | <literal>VAR3</literal>.</para></listitem> | |
97d0e5f8 UTL |
281 | </varlistentry> |
282 | ||
c93ff2e9 FC |
283 | <varlistentry> |
284 | <term><varname>DefaultLimitCPU=</varname></term> | |
285 | <term><varname>DefaultLimitFSIZE=</varname></term> | |
286 | <term><varname>DefaultLimitDATA=</varname></term> | |
287 | <term><varname>DefaultLimitSTACK=</varname></term> | |
288 | <term><varname>DefaultLimitCORE=</varname></term> | |
289 | <term><varname>DefaultLimitRSS=</varname></term> | |
290 | <term><varname>DefaultLimitNOFILE=</varname></term> | |
291 | <term><varname>DefaultLimitAS=</varname></term> | |
292 | <term><varname>DefaultLimitNPROC=</varname></term> | |
293 | <term><varname>DefaultLimitMEMLOCK=</varname></term> | |
294 | <term><varname>DefaultLimitLOCKS=</varname></term> | |
295 | <term><varname>DefaultLimitSIGPENDING=</varname></term> | |
296 | <term><varname>DefaultLimitMSGQUEUE=</varname></term> | |
297 | <term><varname>DefaultLimitNICE=</varname></term> | |
298 | <term><varname>DefaultLimitRTPRIO=</varname></term> | |
299 | <term><varname>DefaultLimitRTTIME=</varname></term> | |
ec8927ca | 300 | |
c93ff2e9 | 301 | <listitem><para>These settings control |
ec8927ca LP |
302 | various default resource limits for |
303 | units. See | |
c93ff2e9 FC |
304 | <citerefentry><refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry> |
305 | for details. Use the string | |
306 | <varname>infinity</varname> to | |
307 | configure no limit on a specific | |
ec8927ca | 308 | resource. These settings may be |
bb31a4ac | 309 | overridden in individual units |
ec8927ca LP |
310 | using the corresponding LimitXXX= |
311 | directives. Note that these resource | |
312 | limits are only defaults for units, | |
313 | they are not applied to PID 1 | |
314 | itself.</para></listitem> | |
c93ff2e9 | 315 | </varlistentry> |
f3e219a2 LP |
316 | </variablelist> |
317 | </refsect1> | |
318 | ||
319 | <refsect1> | |
320 | <title>See Also</title> | |
321 | <para> | |
9cc2c8b7 | 322 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
78894537 LP |
323 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>, |
324 | <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
f3e219a2 LP |
325 | </para> |
326 | </refsect1> | |
327 | ||
328 | </refentry> |