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