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