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