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