chiark / gitweb /
man: sd_bus_path_encode - fix order of arguments
[elogind.git] / man / journald.conf.xml
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     xmlns:xi="http://www.w3.org/2001/XInclude">
27   <refentryinfo>
28     <title>journald.conf</title>
29     <productname>systemd</productname>
30
31     <authorgroup>
32       <author>
33         <contrib>Developer</contrib>
34         <firstname>Lennart</firstname>
35         <surname>Poettering</surname>
36         <email>lennart@poettering.net</email>
37       </author>
38     </authorgroup>
39   </refentryinfo>
40
41   <refmeta>
42     <refentrytitle>journald.conf</refentrytitle>
43     <manvolnum>5</manvolnum>
44   </refmeta>
45
46   <refnamediv>
47     <refname>journald.conf</refname>
48     <refname>journald.conf.d</refname>
49     <refpurpose>Journal service configuration files</refpurpose>
50   </refnamediv>
51
52   <refsynopsisdiv>
53     <para><filename>/etc/systemd/journald.conf</filename></para>
54     <para><filename>/etc/systemd/journald.conf.d/*.conf</filename></para>
55     <para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
56     <para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
57   </refsynopsisdiv>
58
59   <refsect1>
60     <title>Description</title>
61
62     <para>These files configure various parameters of the systemd
63     journal service,
64     <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
65
66   </refsect1>
67
68   <xi:include href="standard-conf.xml" xpointer="confd" />
69   <xi:include href="standard-conf.xml" xpointer="conf" />
70
71   <refsect1>
72     <title>Options</title>
73
74     <para>All options are configured in the
75     <literal>[Journal]</literal> section:</para>
76
77     <variablelist>
78
79       <varlistentry>
80         <term><varname>Storage=</varname></term>
81
82         <listitem><para>Controls where to store journal data. One of
83         <literal>volatile</literal>,
84         <literal>persistent</literal>,
85         <literal>auto</literal> and
86         <literal>none</literal>. If
87         <literal>volatile</literal>, journal
88         log data will be stored only in memory, i.e. below the
89         <filename>/run/log/journal</filename> hierarchy (which is
90         created if needed). If <literal>persistent</literal>, data
91         will be stored preferably on disk, i.e. below the
92         <filename>/var/log/journal</filename> hierarchy (which is
93         created if needed), with a fallback to
94         <filename>/run/log/journal</filename> (which is created if
95         needed), during early boot and if the disk is not writable.
96         <literal>auto</literal> is similar to
97         <literal>persistent</literal> but the directory
98         <filename>/var/log/journal</filename> is not created if
99         needed, so that its existence controls where log data goes.
100         <literal>none</literal> turns off all storage, all log data
101         received will be dropped. Forwarding to other targets, such as
102         the console, the kernel log buffer or a syslog daemon will
103         still work however. Defaults to
104         <literal>auto</literal>.</para></listitem>
105       </varlistentry>
106
107       <varlistentry>
108         <term><varname>Compress=</varname></term>
109
110         <listitem><para>Takes a boolean value. If enabled (the
111         default), data objects that shall be stored in the journal and
112         are larger than a certain threshold are compressed before they
113         are written to the file system.</para></listitem>
114       </varlistentry>
115
116       <varlistentry>
117         <term><varname>Seal=</varname></term>
118
119         <listitem><para>Takes a boolean value. If enabled (the
120         default), and a sealing key is available (as created by
121         <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
122         <option>--setup-keys</option> command), Forward Secure Sealing
123         (FSS) for all persistent journal files is enabled. FSS is
124         based on <ulink
125         url="https://eprint.iacr.org/2013/397">Seekable Sequential Key
126         Generators</ulink> by G. A. Marson and B. Poettering
127         (doi:10.1007/978-3-642-40203-6_7) and may be used to protect
128         journal files from unnoticed alteration.</para></listitem>
129       </varlistentry>
130
131       <varlistentry>
132         <term><varname>SplitMode=</varname></term>
133
134         <listitem><para>Controls whether to split up journal files per
135         user. One of <literal>uid</literal>, <literal>login</literal>
136         and <literal>none</literal>. If <literal>uid</literal>, all
137         users will get each their own journal files regardless of
138         whether they possess a login session or not, however system
139         users will log into the system journal. If
140         <literal>login</literal>, actually logged-in users will get
141         each their own journal files, but users without login session
142         and system users will log into the system journal. If
143         <literal>none</literal>, journal files are not split up by
144         user and all messages are instead stored in the single system
145         journal. Note that splitting up journal files by user is only
146         available for journals stored persistently. If journals are
147         stored on volatile storage (see above), only a single journal
148         file for all user IDs is kept. Defaults to
149         <literal>uid</literal>.</para></listitem>
150       </varlistentry>
151
152       <varlistentry>
153         <term><varname>RateLimitInterval=</varname></term>
154         <term><varname>RateLimitBurst=</varname></term>
155
156         <listitem><para>Configures the rate limiting that is applied
157         to all messages generated on the system. If, in the time
158         interval defined by <varname>RateLimitInterval=</varname>,
159         more messages than specified in
160         <varname>RateLimitBurst=</varname> are logged by a service,
161         all further messages within the interval are dropped until the
162         interval is over. A message about the number of dropped
163         messages is generated. This rate limiting is applied
164         per-service, so that two services which log do not interfere
165         with each other's limits. Defaults to 1000 messages in 30s.
166         The time specification for
167         <varname>RateLimitInterval=</varname> may be specified in the
168         following units: <literal>s</literal>, <literal>min</literal>,
169         <literal>h</literal>, <literal>ms</literal>,
170         <literal>us</literal>. To turn off any kind of rate limiting,
171         set either value to 0.</para></listitem>
172       </varlistentry>
173
174       <varlistentry>
175         <term><varname>SystemMaxUse=</varname></term>
176         <term><varname>SystemKeepFree=</varname></term>
177         <term><varname>SystemMaxFileSize=</varname></term>
178         <term><varname>RuntimeMaxUse=</varname></term>
179         <term><varname>RuntimeKeepFree=</varname></term>
180         <term><varname>RuntimeMaxFileSize=</varname></term>
181
182         <listitem><para>Enforce size limits on the journal files
183         stored. The options prefixed with <literal>System</literal>
184         apply to the journal files when stored on a persistent file
185         system, more specifically
186         <filename>/var/log/journal</filename>. The options prefixed
187         with <literal>Runtime</literal> apply to the journal files
188         when stored on a volatile in-memory file system, more
189         specifically <filename>/run/log/journal</filename>. The former
190         is used only when <filename>/var</filename> is mounted,
191         writable, and the directory
192         <filename>/var/log/journal</filename> exists. Otherwise, only
193         the latter applies. Note that this means that during early
194         boot and if the administrator disabled persistent logging,
195         only the latter options apply, while the former apply if
196         persistent logging is enabled and the system is fully booted
197         up. <command>journalctl</command> and
198         <command>systemd-journald</command> ignore all files with
199         names not ending with <literal>.journal</literal> or
200         <literal>.journal~</literal>, so only such files, located in
201         the appropriate directories, are taken into account when
202         calculating current disk usage.
203         </para>
204
205         <para><varname>SystemMaxUse=</varname> and
206         <varname>RuntimeMaxUse=</varname> control how much disk space
207         the journal may use up at maximum.
208         <varname>SystemKeepFree=</varname> and
209         <varname>RuntimeKeepFree=</varname> control how much disk
210         space systemd-journald shall leave free for other uses.
211         <command>systemd-journald</command> will respect both limits
212         and use the smaller of the two values.</para>
213
214         <para>The first pair defaults to 10% and the second to 15% of
215         the size of the respective file system. If the file system is
216         nearly full and either <varname>SystemKeepFree=</varname> or
217         <varname>RuntimeKeepFree=</varname> is violated when
218         systemd-journald is started, the value will be raised to
219         percentage that is actually free. This means that if there was
220         enough free space before and journal files were created, and
221         subsequently something else causes the file system to fill up,
222         journald will stop using more space, but it will not be
223         removing existing files to go reduce footprint either.</para>
224
225         <para><varname>SystemMaxFileSize=</varname>
226         and
227         <varname>RuntimeMaxFileSize=</varname>
228         control how large individual journal
229         files may grow at maximum. This
230         influences the granularity in which
231         disk space is made available through
232         rotation, i.e. deletion of historic
233         data. Defaults to one eighth of the
234         values configured with
235         <varname>SystemMaxUse=</varname> and
236         <varname>RuntimeMaxUse=</varname>, so
237         that usually seven rotated journal
238         files are kept as history. Specify
239         values in bytes or use K, M, G, T, P,
240         E as units for the specified sizes
241         (equal to 1024, 1024²,... bytes).
242         Note that size limits are enforced
243         synchronously when journal files are
244         extended, and no explicit rotation
245         step triggered by time is
246         needed.</para></listitem>
247       </varlistentry>
248
249       <varlistentry>
250         <term><varname>MaxFileSec=</varname></term>
251
252         <listitem><para>The maximum time to store entries in a single
253         journal file before rotating to the next one. Normally,
254         time-based rotation should not be required as size-based
255         rotation with options such as
256         <varname>SystemMaxFileSize=</varname> should be sufficient to
257         ensure that journal files do not grow without bounds. However,
258         to ensure that not too much data is lost at once when old
259         journal files are deleted, it might make sense to change this
260         value from the default of one month. Set to 0 to turn off this
261         feature. This setting takes time values which may be suffixed
262         with the units <literal>year</literal>,
263         <literal>month</literal>, <literal>week</literal>,
264         <literal>day</literal>, <literal>h</literal> or
265         <literal>m</literal> to override the default time unit of
266         seconds.</para></listitem>
267       </varlistentry>
268
269       <varlistentry>
270         <term><varname>MaxRetentionSec=</varname></term>
271
272         <listitem><para>The maximum time to store journal entries.
273         This controls whether journal files containing entries older
274         then the specified time span are deleted. Normally, time-based
275         deletion of old journal files should not be required as
276         size-based deletion with options such as
277         <varname>SystemMaxUse=</varname> should be sufficient to
278         ensure that journal files do not grow without bounds. However,
279         to enforce data retention policies, it might make sense to
280         change this value from the default of 0 (which turns off this
281         feature). This setting also takes time values which may be
282         suffixed with the units <literal>year</literal>,
283         <literal>month</literal>, <literal>week</literal>,
284         <literal>day</literal>, <literal>h</literal> or <literal>
285         m</literal> to override the default time unit of
286         seconds.</para></listitem>
287       </varlistentry>
288
289
290       <varlistentry>
291         <term><varname>SyncIntervalSec=</varname></term>
292
293         <listitem><para>The timeout before synchronizing journal files
294         to disk. After syncing, journal files are placed in the
295         OFFLINE state. Note that syncing is unconditionally done
296         immediately after a log message of priority CRIT, ALERT or
297         EMERG has been logged. This setting hence applies only to
298         messages of the levels ERR, WARNING, NOTICE, INFO, DEBUG. The
299         default timeout is 5 minutes. </para></listitem>
300       </varlistentry>
301
302       <varlistentry>
303         <term><varname>ForwardToSyslog=</varname></term>
304         <term><varname>ForwardToKMsg=</varname></term>
305         <term><varname>ForwardToConsole=</varname></term>
306         <term><varname>ForwardToWall=</varname></term>
307
308         <listitem><para>Control whether log messages received by the
309         journal daemon shall be forwarded to a traditional syslog
310         daemon, to the kernel log buffer (kmsg), to the system
311         console, or sent as wall messages to all logged-in users.
312         These options take boolean arguments. If forwarding to syslog
313         is enabled but no syslog daemon is running, the respective
314         option has no effect. By default, only forwarding wall is
315         enabled. These settings may be overridden at boot time with
316         the kernel command line options
317         <literal>systemd.journald.forward_to_syslog=</literal>,
318         <literal>systemd.journald.forward_to_kmsg=</literal>,
319         <literal>systemd.journald.forward_to_console=</literal> and
320         <literal>systemd.journald.forward_to_wall=</literal>. When
321         forwarding to the console, the TTY to log to can be changed
322         with <varname>TTYPath=</varname>, described
323         below.</para></listitem>
324       </varlistentry>
325
326       <varlistentry>
327         <term><varname>MaxLevelStore=</varname></term>
328         <term><varname>MaxLevelSyslog=</varname></term>
329         <term><varname>MaxLevelKMsg=</varname></term>
330         <term><varname>MaxLevelConsole=</varname></term>
331         <term><varname>MaxLevelWall=</varname></term>
332
333         <listitem><para>Controls the maximum log level of messages
334         that are stored on disk, forwarded to syslog, kmsg, the
335         console or wall (if that is enabled, see above). As argument,
336         takes one of
337         <literal>emerg</literal>,
338         <literal>alert</literal>,
339         <literal>crit</literal>,
340         <literal>err</literal>,
341         <literal>warning</literal>,
342         <literal>notice</literal>,
343         <literal>info</literal>,
344         <literal>debug</literal>,
345         or integer values in the range of 0..7 (corresponding to the
346         same levels). Messages equal or below the log level specified
347         are stored/forwarded, messages above are dropped. Defaults to
348         <literal>debug</literal> for <varname>MaxLevelStore=</varname>
349         and <varname>MaxLevelSyslog=</varname>, to ensure that the all
350         messages are written to disk and forwarded to syslog. Defaults
351         to
352         <literal>notice</literal> for <varname>MaxLevelKMsg=</varname>,
353         <literal>info</literal> for <varname>MaxLevelConsole=</varname>,
354         and <literal>emerg</literal> for
355         <varname>MaxLevelWall=</varname>.</para></listitem>
356       </varlistentry>
357
358       <varlistentry>
359         <term><varname>TTYPath=</varname></term>
360
361         <listitem><para>Change the console TTY to use if
362         <varname>ForwardToConsole=yes</varname> is used. Defaults to
363         <filename>/dev/console</filename>.</para></listitem>
364       </varlistentry>
365
366     </variablelist>
367
368   </refsect1>
369
370   <refsect1>
371       <title>See Also</title>
372       <para>
373         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
374         <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
375         <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
376         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
377         <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
378       </para>
379   </refsect1>
380
381 </refentry>