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