]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/journald.conf.xml
man: boilerplate unification
[thirdparty/systemd.git] / man / journald.conf.xml
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 Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="journald.conf"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
26 <refentryinfo>
27 <title>journald.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>journald.conf</refentrytitle>
42 <manvolnum>5</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>journald.conf</refname>
47 <refname>journald.conf.d</refname>
48 <refpurpose>Journal service configuration files</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <para><filename>/etc/systemd/journald.conf</filename></para>
53 <para><filename>/etc/systemd/journald.conf.d/*.conf</filename></para>
54 <para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
55 <para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
56 </refsynopsisdiv>
57
58 <refsect1>
59 <title>Description</title>
60
61 <para>These files configure various parameters of the systemd
62 journal service,
63 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
64
65 </refsect1>
66
67 <xi:include href="standard-conf.xml" xpointer="confd" />
68 <xi:include href="standard-conf.xml" xpointer="conf" />
69
70 <refsect1>
71 <title>Options</title>
72
73 <para>All options are configured in the
74 <literal>[Journal]</literal> section:</para>
75
76 <variablelist>
77
78 <varlistentry>
79 <term><varname>Storage=</varname></term>
80
81 <listitem><para>Controls where to store journal data. One of
82 <literal>volatile</literal>,
83 <literal>persistent</literal>,
84 <literal>auto</literal> and
85 <literal>none</literal>. If
86 <literal>volatile</literal>, journal
87 log data will be stored only in memory, i.e. below the
88 <filename>/run/log/journal</filename> hierarchy (which is
89 created if needed). If <literal>persistent</literal>, data
90 will be stored preferably on disk, i.e. below the
91 <filename>/var/log/journal</filename> hierarchy (which is
92 created if needed), with a fallback to
93 <filename>/run/log/journal</filename> (which is created if
94 needed), during early boot and if the disk is not writable.
95 <literal>auto</literal> is similar to
96 <literal>persistent</literal> but the directory
97 <filename>/var/log/journal</filename> is not created if
98 needed, so that its existence controls where log data goes.
99 <literal>none</literal> turns off all storage, all log data
100 received will be dropped. Forwarding to other targets, such as
101 the console, the kernel log buffer or a syslog daemon will
102 still work however. Defaults to
103 <literal>auto</literal>.</para></listitem>
104 </varlistentry>
105
106 <varlistentry>
107 <term><varname>Compress=</varname></term>
108
109 <listitem><para>Takes a boolean value. If enabled (the
110 default), data objects that shall be stored in the journal and
111 are larger than a certain threshold are compressed before they
112 are written to the file system.</para></listitem>
113 </varlistentry>
114
115 <varlistentry>
116 <term><varname>Seal=</varname></term>
117
118 <listitem><para>Takes a boolean value. If enabled (the
119 default), and a sealing key is available (as created by
120 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
121 <option>--setup-keys</option> command), Forward Secure Sealing
122 (FSS) for all persistent journal files is enabled. FSS is
123 based on <ulink
124 url="https://eprint.iacr.org/2013/397">Seekable Sequential Key
125 Generators</ulink> by G. A. Marson and B. Poettering
126 (doi:10.1007/978-3-642-40203-6_7) and may be used to protect
127 journal files from unnoticed alteration.</para></listitem>
128 </varlistentry>
129
130 <varlistentry>
131 <term><varname>SplitMode=</varname></term>
132
133 <listitem><para>Controls whether to split up journal files per
134 user. One of <literal>uid</literal>, <literal>login</literal>
135 and <literal>none</literal>. If <literal>uid</literal>, all
136 users will get each their own journal files regardless of
137 whether they possess a login session or not, however system
138 users will log into the system journal. If
139 <literal>login</literal>, actually logged-in users will get
140 each their own journal files, but users without login session
141 and system users will log into the system journal. If
142 <literal>none</literal>, journal files are not split up by
143 user and all messages are instead stored in the single system
144 journal. Note that splitting up journal files by user is only
145 available for journals stored persistently. If journals are
146 stored on volatile storage (see above), only a single journal
147 file for all user IDs is kept. Defaults to
148 <literal>uid</literal>.</para></listitem>
149 </varlistentry>
150
151 <varlistentry>
152 <term><varname>RateLimitInterval=</varname></term>
153 <term><varname>RateLimitBurst=</varname></term>
154
155 <listitem><para>Configures the rate limiting that is applied
156 to all messages generated on the system. If, in the time
157 interval defined by <varname>RateLimitInterval=</varname>,
158 more messages than specified in
159 <varname>RateLimitBurst=</varname> are logged by a service,
160 all further messages within the interval are dropped until the
161 interval is over. A message about the number of dropped
162 messages is generated. This rate limiting is applied
163 per-service, so that two services which log do not interfere
164 with each other's limits. Defaults to 1000 messages in 30s.
165 The time specification for
166 <varname>RateLimitInterval=</varname> may be specified in the
167 following units: <literal>s</literal>, <literal>min</literal>,
168 <literal>h</literal>, <literal>ms</literal>,
169 <literal>us</literal>. To turn off any kind of rate limiting,
170 set either value to 0.</para></listitem>
171 </varlistentry>
172
173 <varlistentry>
174 <term><varname>SystemMaxUse=</varname></term>
175 <term><varname>SystemKeepFree=</varname></term>
176 <term><varname>SystemMaxFileSize=</varname></term>
177 <term><varname>RuntimeMaxUse=</varname></term>
178 <term><varname>RuntimeKeepFree=</varname></term>
179 <term><varname>RuntimeMaxFileSize=</varname></term>
180
181 <listitem><para>Enforce size limits on the journal files
182 stored. The options prefixed with <literal>System</literal>
183 apply to the journal files when stored on a persistent file
184 system, more specifically
185 <filename>/var/log/journal</filename>. The options prefixed
186 with <literal>Runtime</literal> apply to the journal files
187 when stored on a volatile in-memory file system, more
188 specifically <filename>/run/log/journal</filename>. The former
189 is used only when <filename>/var</filename> is mounted,
190 writable, and the directory
191 <filename>/var/log/journal</filename> exists. Otherwise, only
192 the latter applies. Note that this means that during early
193 boot and if the administrator disabled persistent logging,
194 only the latter options apply, while the former apply if
195 persistent logging is enabled and the system is fully booted
196 up. <command>journalctl</command> and
197 <command>systemd-journald</command> ignore all files with
198 names not ending with <literal>.journal</literal> or
199 <literal>.journal~</literal>, so only such files, located in
200 the appropriate directories, are taken into account when
201 calculating current disk usage.
202 </para>
203
204 <para><varname>SystemMaxUse=</varname> and
205 <varname>RuntimeMaxUse=</varname> control how much disk space
206 the journal may use up at maximum.
207 <varname>SystemKeepFree=</varname> and
208 <varname>RuntimeKeepFree=</varname> control how much disk
209 space systemd-journald shall leave free for other uses.
210 <command>systemd-journald</command> will respect both limits
211 and use the smaller of the two values.</para>
212
213 <para>The first pair defaults to 10% and the second to 15% of
214 the size of the respective file system. If the file system is
215 nearly full and either <varname>SystemKeepFree=</varname> or
216 <varname>RuntimeKeepFree=</varname> is violated when
217 systemd-journald is started, the value will be raised to
218 percentage that is actually free. This means that if there was
219 enough free space before and journal files were created, and
220 subsequently something else causes the file system to fill up,
221 journald will stop using more space, but it will not be
222 removing existing files to go reduce footprint either.</para>
223
224 <para><varname>SystemMaxFileSize=</varname>
225 and
226 <varname>RuntimeMaxFileSize=</varname>
227 control how large individual journal
228 files may grow at maximum. This
229 influences the granularity in which
230 disk space is made available through
231 rotation, i.e. deletion of historic
232 data. Defaults to one eighth of the
233 values configured with
234 <varname>SystemMaxUse=</varname> and
235 <varname>RuntimeMaxUse=</varname>, so
236 that usually seven rotated journal
237 files are kept as history. Specify
238 values in bytes or use K, M, G, T, P,
239 E as units for the specified sizes
240 (equal to 1024, 1024²,... bytes).
241 Note that size limits are enforced
242 synchronously when journal files are
243 extended, and no explicit rotation
244 step triggered by time is
245 needed.</para></listitem>
246 </varlistentry>
247
248 <varlistentry>
249 <term><varname>MaxFileSec=</varname></term>
250
251 <listitem><para>The maximum time to store entries in a single
252 journal file before rotating to the next one. Normally,
253 time-based rotation should not be required as size-based
254 rotation with options such as
255 <varname>SystemMaxFileSize=</varname> should be sufficient to
256 ensure that journal files do not grow without bounds. However,
257 to ensure that not too much data is lost at once when old
258 journal files are deleted, it might make sense to change this
259 value from the default of one month. Set to 0 to turn off this
260 feature. This setting takes time values which may be suffixed
261 with the units <literal>year</literal>,
262 <literal>month</literal>, <literal>week</literal>,
263 <literal>day</literal>, <literal>h</literal> or
264 <literal>m</literal> to override the default time unit of
265 seconds.</para></listitem>
266 </varlistentry>
267
268 <varlistentry>
269 <term><varname>MaxRetentionSec=</varname></term>
270
271 <listitem><para>The maximum time to store journal entries.
272 This controls whether journal files containing entries older
273 then the specified time span are deleted. Normally, time-based
274 deletion of old journal files should not be required as
275 size-based deletion with options such as
276 <varname>SystemMaxUse=</varname> should be sufficient to
277 ensure that journal files do not grow without bounds. However,
278 to enforce data retention policies, it might make sense to
279 change this value from the default of 0 (which turns off this
280 feature). This setting also takes time values which may be
281 suffixed with the units <literal>year</literal>,
282 <literal>month</literal>, <literal>week</literal>,
283 <literal>day</literal>, <literal>h</literal> or <literal>
284 m</literal> to override the default time unit of
285 seconds.</para></listitem>
286 </varlistentry>
287
288
289 <varlistentry>
290 <term><varname>SyncIntervalSec=</varname></term>
291
292 <listitem><para>The timeout before synchronizing journal files
293 to disk. After syncing, journal files are placed in the
294 OFFLINE state. Note that syncing is unconditionally done
295 immediately after a log message of priority CRIT, ALERT or
296 EMERG has been logged. This setting hence applies only to
297 messages of the levels ERR, WARNING, NOTICE, INFO, DEBUG. The
298 default timeout is 5 minutes. </para></listitem>
299 </varlistentry>
300
301 <varlistentry>
302 <term><varname>ForwardToSyslog=</varname></term>
303 <term><varname>ForwardToKMsg=</varname></term>
304 <term><varname>ForwardToConsole=</varname></term>
305 <term><varname>ForwardToWall=</varname></term>
306
307 <listitem><para>Control whether log messages received by the
308 journal daemon shall be forwarded to a traditional syslog
309 daemon, to the kernel log buffer (kmsg), to the system
310 console, or sent as wall messages to all logged-in users.
311 These options take boolean arguments. If forwarding to syslog
312 is enabled but no syslog daemon is running, the respective
313 option has no effect. By default, only forwarding wall is
314 enabled. These settings may be overridden at boot time with
315 the kernel command line options
316 <literal>systemd.journald.forward_to_syslog=</literal>,
317 <literal>systemd.journald.forward_to_kmsg=</literal>,
318 <literal>systemd.journald.forward_to_console=</literal> and
319 <literal>systemd.journald.forward_to_wall=</literal>. When
320 forwarding to the console, the TTY to log to can be changed
321 with <varname>TTYPath=</varname>, described
322 below.</para></listitem>
323 </varlistentry>
324
325 <varlistentry>
326 <term><varname>MaxLevelStore=</varname></term>
327 <term><varname>MaxLevelSyslog=</varname></term>
328 <term><varname>MaxLevelKMsg=</varname></term>
329 <term><varname>MaxLevelConsole=</varname></term>
330 <term><varname>MaxLevelWall=</varname></term>
331
332 <listitem><para>Controls the maximum log level of messages
333 that are stored on disk, forwarded to syslog, kmsg, the
334 console or wall (if that is enabled, see above). As argument,
335 takes one of
336 <literal>emerg</literal>,
337 <literal>alert</literal>,
338 <literal>crit</literal>,
339 <literal>err</literal>,
340 <literal>warning</literal>,
341 <literal>notice</literal>,
342 <literal>info</literal>,
343 <literal>debug</literal>,
344 or integer values in the range of 0..7 (corresponding to the
345 same levels). Messages equal or below the log level specified
346 are stored/forwarded, messages above are dropped. Defaults to
347 <literal>debug</literal> for <varname>MaxLevelStore=</varname>
348 and <varname>MaxLevelSyslog=</varname>, to ensure that the all
349 messages are written to disk and forwarded to syslog. Defaults
350 to
351 <literal>notice</literal> for <varname>MaxLevelKMsg=</varname>,
352 <literal>info</literal> for <varname>MaxLevelConsole=</varname>,
353 and <literal>emerg</literal> for
354 <varname>MaxLevelWall=</varname>.</para></listitem>
355 </varlistentry>
356
357 <varlistentry>
358 <term><varname>TTYPath=</varname></term>
359
360 <listitem><para>Change the console TTY to use if
361 <varname>ForwardToConsole=yes</varname> is used. Defaults to
362 <filename>/dev/console</filename>.</para></listitem>
363 </varlistentry>
364
365 </variablelist>
366
367 </refsect1>
368
369 <refsect1>
370 <title>See Also</title>
371 <para>
372 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
373 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
374 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
375 <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
376 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
377 </para>
378 </refsect1>
379
380 </refentry>