Debian Codegraph @

man/journald.conf.xml

raw
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
8
9 <refentry id="journald.conf"
10 xmlns:xi="http://www.w3.org/2001/XInclude">
11 <refentryinfo>
12 <title>journald.conf</title>
13 <productname>systemd</productname>
14 </refentryinfo>
15
16 <refmeta>
17 <refentrytitle>journald.conf</refentrytitle>
18 <manvolnum>5</manvolnum>
19 </refmeta>
20
21 <refnamediv>
22 <refname>journald.conf</refname>
23 <refname>journald.conf.d</refname>
24 <refname>[email protected]</refname>
25 <refpurpose>Journal service configuration files</refpurpose>
26 </refnamediv>
27
28 <refsynopsisdiv>
29 <para><simplelist>
30 <member><filename>/etc/systemd/journald.conf</filename></member>
31 <member><filename>/run/systemd/journald.conf</filename></member>
32 <member><filename>/usr/local/lib/systemd/journald.conf</filename></member>
33 <member><filename>/usr/lib/systemd/journald.conf</filename></member>
34 <member><filename>/etc/systemd/journald.conf.d/*.conf</filename></member>
35 <member><filename>/run/systemd/journald.conf.d/*.conf</filename></member>
36 <member><filename>/usr/local/lib/systemd/journald.conf.d/*.conf</filename></member>
37 <member><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></member>
38 <member><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename></member>
39 <member><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member>
40 <member><filename>/run/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member>
41 <member><filename>/usr/local/lib/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member>
42 <member><filename>/usr/lib/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member>
43 </simplelist></para>
44 </refsynopsisdiv>
45
46 <refsect1>
47 <title>Description</title>
48
49 <para>These files configure various parameters of the systemd journal service,
50 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
51 See
52 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry>
53 for a general description of the syntax.</para>
54
55 <para>The <command>systemd-journald</command> instance managing the default namespace is configured by
56 <filename>/etc/systemd/journald.conf</filename> and associated drop-ins. Instances managing other
57 namespaces read <filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename>
58 and associated drop-ins with the namespace identifier filled in. This allows each namespace to carry
59 a distinct configuration. See
60 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
61 for details about journal namespaces.</para>
62 </refsect1>
63
64 <xi:include href="standard-conf.xml" xpointer="main-conf" />
65
66 <refsect1>
67 <title>Options</title>
68
69 <para>All options are configured in the
70 [Journal] section:</para>
71
72 <variablelist class='config-directives'>
73
74 <varlistentry>
75 <term><varname>Storage=</varname></term>
76
77 <listitem><para>Controls where to store journal data. One of <literal>volatile</literal>,
78 <literal>persistent</literal>, <literal>auto</literal> and <literal>none</literal>. If
79 <literal>volatile</literal>, journal log data will be stored only in memory, i.e. below the
80 <filename>/run/log/journal</filename> hierarchy (which is created if needed). If
81 <literal>persistent</literal>, data will be stored preferably on disk, i.e. below the
82 <filename>/var/log/journal</filename> hierarchy (which is created if needed), with a fallback to
83 <filename>/run/log/journal</filename> (which is created if needed), during early boot and if the disk
84 is not writable. <literal>auto</literal> behaves like <literal>persistent</literal> if the
85 <filename>/var/log/journal</filename> directory exists, and <literal>volatile</literal> otherwise
86 (the existence of the directory controls the storage mode). <literal>none</literal> turns off all
87 storage, all log data received will be dropped (but forwarding to other targets, such as the console,
88 the kernel log buffer, or a syslog socket will still work). Defaults to
89 <literal>&JOURNAL_STORAGE_DEFAULT;</literal> in the default journal namespace (this value is
90 determined at compilation time), and <literal>persistent</literal> in all others.</para>
91
92 <para>Note that journald will initially use volatile storage, until a call to
93 <command>journalctl --flush</command> (or sending <constant>SIGUSR1</constant> to journald) will cause
94 it to switch to persistent logging (under the conditions mentioned above). This is done automatically
95 on boot via <literal>systemd-journal-flush.service</literal>.</para>
96
97 <para>Note that when this option is changed to <literal>volatile</literal>, existing persistent data
98 is not removed. In the other direction,
99 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> with
100 the <option>--flush</option> option may be used to move volatile data to persistent storage.</para>
101
102 <para>When journal namespacing (see <varname>LogNamespace=</varname> in
103 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>) is
104 used, setting <varname>Storage=</varname> to <literal>volatile</literal> or <literal>auto</literal>
105 will not have an effect on the creation of the per-namespace logs directory in
106 <filename>/var/log/journal/</filename>, as the <filename>[email protected]</filename> service
107 file by default carries <varname>LogsDirectory=</varname>. To turn that off, add a unit file drop-in
108 file that sets <varname>LogsDirectory=</varname> to an empty string.</para>
109
110 <para>Note that per-user journal files are not supported unless persistent storage is enabled, thus
111 making <command>journalctl --user</command> unavailable.</para>
112
113 <para>The storage to use can also be specified via the <literal>journal.storage</literal>
114 credential. Values configured via configuration files take priority over values configured via the
115 credential.</para>
116
117 <xi:include href="version-info.xml" xpointer="v186"/>
118 </listitem>
119 </varlistentry>
120
121 <varlistentry>
122 <term><varname>Compress=</varname></term>
123
124 <listitem><para>Can take a boolean value. If enabled (the
125 default), data objects that shall be stored in the journal
126 and are larger than the default threshold of 512 bytes are
127 compressed before they are written to the file system. It
128 can also be set to a number of bytes to specify the
129 compression threshold directly. Suffixes like K, M, and G
130 can be used to specify larger units.</para></listitem>
131 </varlistentry>
132
133 <varlistentry>
134 <term><varname>Seal=</varname></term>
135
136 <listitem><para>Takes a boolean value. If enabled (the
137 default), and a sealing key is available (as created by
138 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
139 <option>--setup-keys</option> command), Forward Secure Sealing
140 (FSS) for all persistent journal files is enabled. FSS is
141 based on <ulink
142 url="https://eprint.iacr.org/2013/397">Seekable Sequential Key
143 Generators</ulink> by G. A. Marson and B. Poettering
144 (doi:10.1007/978-3-642-40203-6_7) and may be used to protect
145 journal files from unnoticed alteration.</para>
146
147 <xi:include href="version-info.xml" xpointer="v189"/></listitem>
148 </varlistentry>
149
150 <varlistentry>
151 <term><varname>SplitMode=</varname></term>
152
153 <listitem><para>Controls whether to split up journal files per user, either <literal>uid</literal> or
154 <literal>none</literal>. Split journal files are primarily useful for access control: on UNIX/Linux access
155 control is managed per file, and the journal daemon will assign users read access to their journal files. If
156 <literal>uid</literal>, all regular users (with UID outside the range of system users, dynamic service users,
157 and the nobody user) will each get their own journal files, and system users will log to the system journal.
158 See <ulink url="https://systemd.io/UIDS-GIDS">Users, Groups, UIDs and GIDs on systemd systems</ulink>
159 for more details about UID ranges.
160 If <literal>none</literal>, journal files are not split up by user and all messages are
161 instead stored in the single system journal. In this mode unprivileged users generally do not have access to
162 their own log data. Note that splitting up journal files by user is only available for journals stored
163 persistently. If journals are stored on volatile storage (see <varname>Storage=</varname> above), only a single
164 journal file is used. Defaults to <literal>uid</literal>.</para>
165
166 <xi:include href="version-info.xml" xpointer="v190"/></listitem>
167 </varlistentry>
168
169 <varlistentry>
170 <term><varname>RateLimitIntervalSec=</varname></term>
171 <term><varname>RateLimitBurst=</varname></term>
172
173 <listitem><para>Configures the rate limiting that is applied
174 to all messages generated on the system. If, in the time
175 interval defined by <varname>RateLimitIntervalSec=</varname>,
176 more messages than specified in
177 <varname>RateLimitBurst=</varname> are logged by a service,
178 all further messages within the interval are dropped until the
179 interval is over. A message about the number of dropped
180 messages is generated. This rate limiting is applied
181 per-service, so that two services which log do not interfere
182 with each other's limits. Defaults to 10000 messages in 30s.
183 The time specification for
184 <varname>RateLimitIntervalSec=</varname> may be specified in the
185 following units: <literal>s</literal>, <literal>min</literal>,
186 <literal>h</literal>, <literal>ms</literal>,
187 <literal>us</literal>. To turn off any kind of rate limiting,
188 set either value to 0.</para>
189
190 <para>Note that the effective rate limit is multiplied by a
191 factor derived from the available free disk space for the journal.
192 Currently, this factor is calculated using the base 2 logarithm.</para>
193
194 <table>
195 <title>Example <varname>RateLimitBurst=</varname> rate
196 modifications by the available disk space</title>
197 <tgroup cols='2'>
198 <colspec colname='freespace' />
199 <colspec colname='multiplier' />
200 <thead>
201 <row>
202 <entry>Available Disk Space</entry>
203 <entry>Burst Multiplier</entry>
204 </row>
205 </thead>
206 <tbody>
207 <row>
208 <entry>&lt;= 1MB</entry>
209 <entry>1</entry>
210 </row>
211 <row>
212 <entry>&lt;= 16MB</entry>
213 <entry>2</entry>
214 </row>
215 <row>
216 <entry>&lt;= 256MB</entry>
217 <entry>3</entry>
218 </row>
219 <row>
220 <entry>&lt;= 4GB</entry>
221 <entry>4</entry>
222 </row>
223 <row>
224 <entry>&lt;= 64GB</entry>
225 <entry>5</entry>
226 </row>
227 <row>
228 <entry>&lt;= 1TB</entry>
229 <entry>6</entry>
230 </row>
231 </tbody>
232 </tgroup>
233 </table>
234
235 <para>If a service provides rate limits for itself through
236 <varname>LogRateLimitIntervalSec=</varname> and/or <varname>LogRateLimitBurst=</varname>
237 in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
238 those values will override the settings specified here.</para>
239 </listitem>
240 </varlistentry>
241
242 <varlistentry>
243 <term><varname>SystemMaxUse=</varname></term>
244 <term><varname>SystemKeepFree=</varname></term>
245 <term><varname>SystemMaxFileSize=</varname></term>
246 <term><varname>SystemMaxFiles=</varname></term>
247 <term><varname>RuntimeMaxUse=</varname></term>
248 <term><varname>RuntimeKeepFree=</varname></term>
249 <term><varname>RuntimeMaxFileSize=</varname></term>
250 <term><varname>RuntimeMaxFiles=</varname></term>
251
252 <listitem><para>Enforce size limits on the journal files
253 stored. The options prefixed with <literal>System</literal>
254 apply to the journal files when stored on a persistent file
255 system, more specifically
256 <filename>/var/log/journal</filename>. The options prefixed
257 with <literal>Runtime</literal> apply to the journal files
258 when stored on a volatile in-memory file system, more
259 specifically <filename>/run/log/journal</filename>. The former
260 is used only when <filename>/var/</filename> is mounted,
261 writable, and the directory
262 <filename>/var/log/journal</filename> exists. Otherwise, only
263 the latter applies. Note that this means that during early
264 boot and if the administrator disabled persistent logging,
265 only the latter options apply, while the former apply if
266 persistent logging is enabled and the system is fully booted
267 up. <command>journalctl</command> and
268 <command>systemd-journald</command> ignore all files with
269 names not ending with <literal>.journal</literal> or
270 <literal>.journal~</literal>, so only such files, located in
271 the appropriate directories, are taken into account when
272 calculating current disk usage.</para>
273
274 <para><varname>SystemMaxUse=</varname> and
275 <varname>RuntimeMaxUse=</varname> control how much disk space
276 the journal may use up at most.
277 <varname>SystemKeepFree=</varname> and
278 <varname>RuntimeKeepFree=</varname> control how much disk
279 space systemd-journald shall leave free for other uses.
280 <command>systemd-journald</command> will respect both limits
281 and use the smaller of the two values.</para>
282
283 <para>The first pair defaults to 10% and the second to 15% of
284 the size of the respective file system, but each of the calculated default values is
285 capped to 4G. If the file system is nearly full and either
286 <varname>SystemKeepFree=</varname> or
287 <varname>RuntimeKeepFree=</varname> are violated when
288 systemd-journald is started, the limit will be raised to the
289 percentage that is actually free. This means that if there was
290 enough free space before and journal files were created, and
291 subsequently something else causes the file system to fill up,
292 journald will stop using more space, but it will not be
293 removing existing files to reduce the footprint again,
294 either. Also note that only archived files are deleted to reduce the
295 space occupied by journal files. This means that, in effect, there might
296 still be more space used than <varname>SystemMaxUse=</varname> or
297 <varname>RuntimeMaxUse=</varname> limit after a vacuuming operation is
298 complete.</para>
299
300 <para><varname>SystemMaxFileSize=</varname> and <varname>RuntimeMaxFileSize=</varname> control how
301 large individual journal files may grow at most. This influences the granularity in which disk space
302 is made available through rotation, i.e. deletion of historic data. Defaults to one eighth of the
303 values configured with <varname>SystemMaxUse=</varname> and <varname>RuntimeMaxUse=</varname> capped
304 to 128M, so that usually seven rotated journal files are kept as history. If the journal compact
305 mode is enabled (enabled by default), the maximum file size is capped to 4G.</para>
306
307 <para>Specify values in bytes or use K, M, G, T, P, E as units for the specified sizes (equal to
308 1024, 1024², … bytes). Note that size limits are enforced synchronously when journal files are
309 extended, and no explicit rotation step triggered by time is needed.</para>
310
311 <para><varname>SystemMaxFiles=</varname> and
312 <varname>RuntimeMaxFiles=</varname> control how many
313 individual journal files to keep at most. Note that only
314 archived files are deleted to reduce the number of files until
315 this limit is reached; active files will stay around. This
316 means that, in effect, there might still be more journal files
317 around in total than this limit after a vacuuming operation is
318 complete. This setting defaults to 100.</para></listitem>
319 </varlistentry>
320
321 <varlistentry>
322 <term><varname>MaxFileSec=</varname></term>
323
324 <listitem><para>The maximum time to store entries in a single
325 journal file before rotating to the next one. Normally,
326 time-based rotation should not be required as size-based
327 rotation with options such as
328 <varname>SystemMaxFileSize=</varname> should be sufficient to
329 ensure that journal files do not grow without bounds. However,
330 to ensure that not too much data is lost at once when old
331 journal files are deleted, it might make sense to change this
332 value from the default of one month. Set to 0 to turn off this
333 feature. This setting takes time values which may be suffixed
334 with the units <literal>year</literal>,
335 <literal>month</literal>, <literal>week</literal>,
336 <literal>day</literal>, <literal>h</literal> or
337 <literal>m</literal> to override the default time unit of
338 seconds.</para>
339
340 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
341 </varlistentry>
342
343 <varlistentry>
344 <term><varname>MaxRetentionSec=</varname></term>
345
346 <listitem><para>The maximum time to store journal entries.
347 This controls whether journal files containing entries older
348 than the specified time span are deleted. Normally, time-based
349 deletion of old journal files should not be required as
350 size-based deletion with options such as
351 <varname>SystemMaxUse=</varname> should be sufficient to
352 ensure that journal files do not grow without bounds. However,
353 to enforce data retention policies, it might make sense to
354 change this value from the default of 0 (which turns off this
355 feature). This setting also takes time values which may be
356 suffixed with the units <literal>year</literal>,
357 <literal>month</literal>, <literal>week</literal>,
358 <literal>day</literal>, <literal>h</literal> or <literal>
359 m</literal> to override the default time unit of
360 seconds.</para>
361
362 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
363 </varlistentry>
364
365 <varlistentry>
366 <term><varname>SyncIntervalSec=</varname></term>
367
368 <listitem><para>The timeout before synchronizing journal files
369 to disk. After syncing, journal files are placed in the
370 OFFLINE state. Note that syncing is unconditionally done
371 immediately after a log message of priority CRIT, ALERT or
372 EMERG has been logged. This setting hence applies only to
373 messages of the levels ERR, WARNING, NOTICE, INFO, DEBUG. The
374 default timeout is 5 minutes. </para>
375
376 <xi:include href="version-info.xml" xpointer="v199"/></listitem>
377 </varlistentry>
378
379 <varlistentry>
380 <term><varname>ForwardToSyslog=</varname></term>
381 <term><varname>ForwardToKMsg=</varname></term>
382 <term><varname>ForwardToConsole=</varname></term>
383 <term><varname>ForwardToWall=</varname></term>
384 <term><varname>ForwardToSocket=</varname></term>
385
386 <listitem><para>Control whether log messages received by the journal daemon shall be forwarded to a
387 traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, sent as wall
388 messages to all logged-in users or sent over a socket. These options take boolean arguments except
389 for <literal>ForwardToSocket=</literal> which takes an address instead. If forwarding
390 to syslog is enabled but nothing reads messages from the socket, forwarding to syslog has no effect. By default,
391 only forwarding to wall is enabled. These settings may be overridden at boot time with the kernel
392 command line options <literal>systemd.journald.forward_to_syslog</literal>,
393 <literal>systemd.journald.forward_to_kmsg</literal>,
394 <literal>systemd.journald.forward_to_console</literal>, and
395 <literal>systemd.journald.forward_to_wall</literal>. If the option name is specified without
396 <literal>=</literal> and the following argument, true is assumed. Otherwise, the argument is parsed
397 as a boolean.</para>
398
399 <para>The socket forwarding address can be specified with the credential
400 <literal>journal.forward_to_socket</literal>. The following socket types are supported:</para>
401
402 <para><simplelist type="inline">
403 <member><constant>AF_INET</constant> (e.g. <literal>192.168.0.11:4444</literal>)</member>
404 <member><constant>AF_INET6</constant> (e.g. <literal>[2001:db8::ff00:42:8329]:4444</literal>)</member>
405 <member><constant>AF_UNIX</constant> (e.g. <literal>/run/host/journal/socket</literal>)</member>
406 <member><constant>AF_VSOCK</constant> (e.g. <literal>vsock:2:1234</literal>)</member>
407 </simplelist></para>
408
409 <para>When forwarding to the console, the TTY to log to can be changed with
410 <varname>TTYPath=</varname>, described below.</para>
411
412 <para>When forwarding to the kernel log buffer (kmsg), make sure to select a suitably large size for
413 the log buffer, for example by adding <literal>log_buf_len=8M</literal> to the kernel command line.
414 <command>systemd</command> will automatically disable kernel's rate-limiting applied to userspace
415 processes (equivalent to setting <literal>printk.devkmsg=on</literal>).</para>
416
417 <para>When forwarding over a socket the <ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS/#journal-export-format">
418 Journal Export Format</ulink> is used when sending over the wire. Notably this includes the metadata
419 field <varname>__REALTIME_TIMESTAMP</varname> so that
420 <command>systemd-journal-remote</command> (see
421 <citerefentry><refentrytitle>systemd-journal-remote.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
422 can be used to receive the forwarded journal entries.</para>
423
424 <para>Note: Forwarding is performed synchronously within journald, and may significantly affect its
425 performance. This is particularly relevant when using ForwardToConsole=yes in cloud environments,
426 where the console is often a slow, virtual serial port.
427 Since journald is implemented as a conventional single-process daemon, forwarding to a completely
428 hung console will block journald. This can have a cascading effect resulting in any services synchronously
429 logging to the blocked journal also becoming blocked. Unless actively debugging/developing something, it is
430 generally preferable to setup a <command>journalctl --follow</command> style service redirected to the
431 console, instead of ForwardToConsole=yes, for production use.</para>
432 </listitem>
433
434 <para>Note: Using <varname>ForwardToSocket=</varname> over IPv4/IPv6 links can be very slow due to the synchronous nature of the sockets.
435 Take care to ensure your link is a low-latency local link if possible. Typically IP networking is not available everywhere
436 journald runs, e.g. in the initrd during boot. Consider using <constant>AF_VSOCK</constant>/<constant>AF_UNIX</constant> sockets for this if possible.
437 </para>
438 </varlistentry>
439
440 <varlistentry>
441 <term><varname>MaxLevelStore=</varname></term>
442 <term><varname>MaxLevelSyslog=</varname></term>
443 <term><varname>MaxLevelKMsg=</varname></term>
444 <term><varname>MaxLevelConsole=</varname></term>
445 <term><varname>MaxLevelWall=</varname></term>
446 <term><varname>MaxLevelSocket=</varname></term>
447
448 <listitem><para>Controls the maximum log level of messages that are stored in the journal, forwarded
449 to syslog, kmsg, the console, the wall, or a socket (if that is enabled, see above). As argument,
450 takes one of <literal>emerg</literal>, <literal>alert</literal>, <literal>crit</literal>,
451 <literal>err</literal>, <literal>warning</literal>, <literal>notice</literal>,
452 <literal>info</literal>, <literal>debug</literal>, or integer values in the range of 0–7
453 (corresponding to the same levels). Messages equal or below the log level specified are
454 stored/forwarded, messages above are dropped. Defaults to <literal>debug</literal> for
455 <varname>MaxLevelStore=</varname>, <varname>MaxLevelSyslog=</varname> and
456 <varname>MaxLevelSocket=</varname>, to ensure that the all messages are stored in the journal,
457 forwarded to syslog and the socket if one exists. Defaults to <literal>notice</literal> for
458 <varname>MaxLevelKMsg=</varname>, <literal>info</literal> for <varname>MaxLevelConsole=</varname>,
459 and <literal>emerg</literal> for <varname>MaxLevelWall=</varname>. These settings may be overridden
460 at boot time with the kernel command line options
461 <literal>systemd.journald.max_level_store=</literal>,
462 <literal>systemd.journald.max_level_syslog=</literal>,
463 <literal>systemd.journald.max_level_kmsg=</literal>,
464 <literal>systemd.journald.max_level_console=</literal>,
465 <literal>systemd.journald.max_level_wall=</literal>,
466 <literal>systemd.journald.max_level_socket=</literal>.</para>
467
468 <xi:include href="version-info.xml" xpointer="v185"/>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry>
473 <term><varname>ReadKMsg=</varname></term>
474
475 <listitem><para>Takes a boolean value. If enabled <command>systemd-journal</command> processes
476 <filename>/dev/kmsg</filename> messages generated by the kernel. In the default journal namespace
477 this option is enabled by default, it is disabled in all others.</para>
478
479 <xi:include href="version-info.xml" xpointer="v235"/></listitem>
480 </varlistentry>
481
482 <varlistentry>
483 <term><varname>Audit=</varname></term>
484
485 <listitem><para>Takes a boolean value or special value <literal>keep</literal>. If enabled
486 <command>systemd-journald</command> will turn on kernel auditing on start-up. If disabled it will
487 turn it off. When <literal>keep</literal> it will neither enable nor disable it, leaving the previous
488 state unchanged. This means if another tool turns on auditing even if
489 <command>systemd-journald</command> left it off, it will still collect the generated messages.
490 Defaults to yes in the default journal namespace, and <literal>keep</literal> otherwise.</para>
491
492 <!-- Explicit assignment of an empty string is equivalent to 'keep', for backward compatibility. -->
493
494 <para>Note that this option does not control whether <command>systemd-journald</command> collects
495 generated audit records, it just controls whether it tells the kernel to generate them. If you need
496 to prevent <command>systemd-journald</command> from collecting the generated messages, the socket
497 unit <literal>systemd-journald-audit.socket</literal> can be disabled and, in this case, this setting
498 is without effect.</para>
499
500 <xi:include href="version-info.xml" xpointer="v246"/>
501 </listitem>
502 </varlistentry>
503
504 <varlistentry>
505 <term><varname>TTYPath=</varname></term>
506
507 <listitem><para>Change the console TTY to use if
508 <varname>ForwardToConsole=yes</varname> is used. Defaults to
509 <filename>/dev/console</filename>.</para>
510
511 <xi:include href="version-info.xml" xpointer="v185"/></listitem>
512 </varlistentry>
513
514 <varlistentry>
515 <term><varname>LineMax=</varname></term>
516
517 <listitem><para>The maximum line length to permit when converting stream logs into record logs. When a systemd
518 unit's standard output/error are connected to the journal via a stream socket, the data read is split into
519 individual log records at newline (<literal>\n</literal>, ASCII 10) and <constant>NUL</constant> characters. If no such delimiter is
520 read for the specified number of bytes a hard log record boundary is artificially inserted, breaking up overly
521 long lines into multiple log records. Selecting overly large values increases the possible memory usage of the
522 Journal daemon for each stream client, as in the worst case the journal daemon needs to buffer the specified
523 number of bytes in memory before it can flush a new log record to disk. Also note that permitting overly large
524 line maximum line lengths affects compatibility with traditional log protocols as log records might not fit
525 anymore into a single <constant>AF_UNIX</constant> or <constant>AF_INET</constant> datagram. Takes a size in
526 bytes. If the value is suffixed with K, M, G or T, the specified size is parsed as Kilobytes, Megabytes,
527 Gigabytes, or Terabytes (with the base 1024), respectively. Defaults to 48K, which is relatively large but
528 still small enough so that log records likely fit into network datagrams along with extra room for
529 metadata. Note that values below 79 are not accepted and will be bumped to 79.</para>
530
531 <xi:include href="version-info.xml" xpointer="v235"/></listitem>
532 </varlistentry>
533
534 </variablelist>
535
536 </refsect1>
537
538 <refsect1>
539 <title>Forwarding to traditional syslog daemons</title>
540
541 <para>
542 Journal events can be transferred to a different logging daemon
543 in two different ways. With the first method, messages are
544 immediately forwarded to a socket
545 (<filename>/run/systemd/journal/syslog</filename>), where the
546 traditional syslog daemon can read them. This method is
547 controlled by the <varname>ForwardToSyslog=</varname> option. With a
548 second method, a syslog daemon behaves like a normal journal
549 client, and reads messages from the journal files, similarly to
550 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
551 With this, messages do not have to be read immediately,
552 which allows a logging daemon which is only started late in boot
553 to access all messages since the start of the system. In
554 addition, full structured meta-data is available to it. This
555 method of course is available only if the messages are stored in
556 a journal file at all. So it will not work if
557 <varname>Storage=none</varname> is set. It should be noted that
558 usually the <emphasis>second</emphasis> method is used by syslog
559 daemons, so the <varname>Storage=</varname> option, and not the
560 <varname>ForwardToSyslog=</varname> option, is relevant for them.
561 </para>
562 </refsect1>
563
564 <refsect1>
565 <title>See Also</title>
566 <para><simplelist type="inline">
567 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
568 <member><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
569 <member><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
570 <member><citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
571 <member><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
572 </simplelist></para>
573 </refsect1>
574
575 </refentry>