chiark / gitweb /
Spelling fixes.
[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         <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
57                 <para>This files configures various parameters of the
58                 systemd journal service
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>Compress=</varname></term>
73
74                                 <listitem><para>Takes a boolean
75                                 value. If enabled (the default) data
76                                 objects that shall be stored in the
77                                 journal and are larger than a certain
78                                 threshold are compressed with the XZ
79                                 compression algorithm before they are
80                                 written to the file
81                                 system.</para></listitem>
82                         </varlistentry>
83
84                         <varlistentry>
85                                 <term><varname>RateLimitInterval=</varname></term>
86                                 <term><varname>RateLimitBurst=</varname></term>
87
88                                 <listitem><para>Configures the rate
89                                 limiting that is applied to all
90                                 messages generated on the system. If
91                                 in the time interval defined by
92                                 <varname>RateLimitInterval=</varname>
93                                 more messages than specified in
94                                 <varname>RateLimitBurst=</varname> are
95                                 logged by a service all further
96                                 messages within the interval are
97                                 dropped, until the interval is over. A
98                                 message about the number of dropped
99                                 messages is generated. This rate
100                                 limiting is applied per-service, so
101                                 that two services which log do not
102                                 interfere with each other's
103                                 limit. Defaults to 100 messages in
104                                 10s. The time specification for
105                                 <varname>RateLimitInterval=</varname>
106                                 may be specified in the following
107                                 units: <literal>s</literal>,
108                                 <literal>min</literal>,
109                                 <literal>h</literal>,
110                                 <literal>ms</literal>,
111                                 <literal>us</literal>. To turn off any
112                                 kind of rate limiting, set either
113                                 value to 0.</para></listitem>
114                         </varlistentry>
115
116                         <varlistentry>
117                                 <term><varname>SystemMaxUse=</varname></term>
118                                 <term><varname>SystemKeepFree=</varname></term>
119                                 <term><varname>SystemMaxFileSize=</varname></term>
120                                 <term><varname>SystemMinFileSize=</varname></term>
121                                 <term><varname>RuntimeMaxUse=</varname></term>
122                                 <term><varname>RuntimeKeepFree=</varname></term>
123                                 <term><varname>RuntimeMaxFileSize=</varname></term>
124                                 <term><varname>RuntimeMinFileSize=</varname></term>
125
126                                 <listitem><para>Enforce size limits on
127                                 the journal files stored. The options
128                                 prefixed with
129                                 <literal>System</literal> apply to the
130                                 journal files when stored on a
131                                 persistent file system, more
132                                 specifically
133                                 <filename>/var/log/journal</filename>. The
134                                 options prefixed with
135                                 <literal>Runtime</literal> apply to
136                                 the journal files when stored on a
137                                 volatile in-memory file system, more
138                                 specifically
139                                 <filename>/run/log/journal</filename>. The
140                                 former is used only when
141                                 <filename>/var</filename> is mounted,
142                                 writable and the directory
143                                 <filename>/var/log/journal</filename>
144                                 exists. Otherwise only the latter
145                                 applies. Note that this means that
146                                 during early boot and if the
147                                 administrator disabled persistent
148                                 logging only the latter options apply,
149                                 while the former apply if persistent
150                                 logging is enabled and the system is
151                                 fully booted
152                                 up. <varname>SystemMaxUse=</varname>
153                                 and <varname>RuntimeMaxUse=</varname>
154                                 control how much disk space the
155                                 journal may use up at
156                                 maximum. Defaults to 10% of the size
157                                 of the respective file
158                                 system. <varname>SystemKeepFree=</varname>
159                                 and
160                                 <varname>RuntimeKeepFree=</varname>
161                                 control how much disk space the
162                                 journal shall always leave free for
163                                 other uses if less than the disk space
164                                 configured in
165                                 <varname>SystemMaxUse=</varname> and
166                                 <varname>RuntimeMaxUse=</varname> is
167                                 available. Defaults to 5% of the size
168                                 of the respective file
169                                 system. <varname>SystemMaxFileSize=</varname>
170                                 and
171                                 <varname>RuntimeMaxFileSize=</varname>
172                                 control how large individual journal
173                                 files may grow at maximum. This
174                                 influences the granularity in which
175                                 disk space is made available through
176                                 rotation, i.e. deletion of historic
177                                 data. Defaults to one eighth of the
178                                 values configured with
179                                 <varname>SystemMaxUse=</varname> and
180                                 <varname>RuntimeMaxUse=</varname>, so
181                                 that usually seven rotated journal
182                                 files are kept as
183                                 history. <varname>SystemMinFileSize=</varname>
184                                 and
185                                 <varname>RuntimeMinFileSize=</varname>
186                                 control how large individual journal
187                                 files grow at minimum. Defaults to
188                                 64K. Specify values in bytes or use
189                                 K, M, G, T, P, E as units for the
190                                 specified sizes. Note that size limits
191                                 are enforced synchronously to journal
192                                 files as they are extended, and need
193                                 no explicit rotation step triggered by
194                                 time.</para></listitem>
195                         </varlistentry>
196
197                         <varlistentry>
198                                 <term><varname>ForwardToSyslog=</varname></term>
199                                 <term><varname>ForwardToKMsg=</varname></term>
200                                 <term><varname>ForwardToConsole=</varname></term>
201
202                                 <listitem><para>Control whether log
203                                 messages received by the journal
204                                 daemon shall be forwarded to a
205                                 traditional syslog daemon, to the
206                                 kernel log buffer (kmsg), or to the
207                                 system console. These options take
208                                 boolean arguments. If forwarding to
209                                 syslog is enabled but no syslog daemon
210                                 is running the respective option has
211                                 no effect. By default only forwarding
212                                 to syslog is enabled. These settings
213                                 may be overridden at boot time with the
214                                 kernel command line options
215                                 <literal>systemd.journald.forward_to_syslog=</literal>,
216                                 <literal>systemd.journald.forward_to_kmsg=</literal>
217                                 and
218                                 <literal>systemd.journald.forward_to_console=</literal>. If
219                                 forwarding to the kernel log buffer and
220                                 <varname>ImportKernel=</varname> is
221                                 enabled at the same time care is taken
222                                 to avoid logging loops. It is safe to
223                                 use these options in combination.
224                                 </para></listitem>
225                         </varlistentry>
226
227                         <varlistentry>
228                                 <term><varname>MaxLevelStore=</varname></term>
229                                 <term><varname>MaxLevelSyslog=</varname></term>
230                                 <term><varname>MaxLevelKMsg=</varname></term>
231                                 <term><varname>MaxLevelConsole=</varname></term>
232
233                                 <listitem><para>Controls the maximum
234                                 log level of messages that are stored
235                                 on disk, forwarded to syslog, kmsg or
236                                 the console (if that is enabled, see
237                                 above). As argument, takes one of
238                                 <literal>emerg</literal>,
239                                 <literal>alert</literal>,
240                                 <literal>crit</literal>,
241                                 <literal>err</literal>,
242                                 <literal>warning</literal>,
243                                 <literal>notice</literal>,
244                                 <literal>info</literal>,
245                                 <literal>debug</literal> or integer
246                                 values in the range of 0..7 (corresponding
247                                 to the same levels). Messages equal or below
248                                 the log level specified are
249                                 stored/forwarded, messages above are
250                                 dropped. Defaults to
251                                 <literal>debug</literal> for
252                                 <varname>MaxLevelStore=</varname> and
253                                 <varname>MaxLevelSyslog=</varname>, to
254                                 ensure that the all messages are
255                                 written to disk and forwarded to
256                                 syslog. Defaults to
257                                 <literal>notice</literal> for
258                                 <varname>MaxLevelKMsg=</varname> and
259                                 <literal>info</literal> for
260                                 <varname>MaxLevelConsole=</varname>.</para></listitem>
261                         </varlistentry>
262
263                         <varlistentry>
264                                 <term><varname>TTYPath=</varname></term>
265
266                                 <listitem><para>Change the console TTY
267                                 to use if
268                                 <varname>ForwardToConsole=yes</varname>
269                                 is used. Defaults to
270                                 <filename>/dev/console</filename>.</para></listitem>
271                         </varlistentry>
272
273                         <varlistentry>
274                                 <term><varname>ImportKernel=</varname></term>
275
276                                 <listitem><para>Controls whether
277                                 kernel log messages shall be stored in
278                                 the journal. Takes a boolean argument
279                                 and defaults to disabled. Note that
280                                 currently only one userspace service
281                                 can read kernel messages at a time,
282                                 which means that kernel log message
283                                 reading might get corrupted if it
284                                 is enabled in more than one service,
285                                 for example in both the journal and a
286                                 traditional syslog service.
287                                 </para></listitem>
288                         </varlistentry>
289
290                         <varlistentry>
291                                 <term><varname>Storage=</varname></term>
292
293                                 <listitem><para>Controls where to
294                                 store journal data. One of
295                                 <literal>volatile</literal>,
296                                 <literal>persistent</literal>,
297                                 <literal>auto</literal> and
298                                 <literal>none</literal>. If
299                                 <literal>volatile</literal> journal
300                                 log data will be stored only in
301                                 memory, i.e. below the
302                                 <filename>/run/log/journal</filename>
303                                 hierarchy (which is created if
304                                 needed). If
305                                 <literal>persistent</literal> data will
306                                 be stored preferably on disk,
307                                 i.e. below the
308                                 <filename>/var/log/journal</filename>
309                                 hierarchy (which is created if
310                                 needed), with a fallback to
311                                 <filename>/run/log/journal</filename>
312                                 (which is created if needed), during
313                                 early boot and if the disk is not
314                                 writable. <literal>auto</literal> is
315                                 similar to
316                                 <literal>persistent</literal> but the
317                                 directory
318                                 <filename>/var/log/journal</filename>
319                                 is not created if needed, so that its
320                                 existence controls where log data
321                                 goes. <literal>none</literal> turns
322                                 off all storage, all log data received
323                                 will be dropped. Forwarding to other
324                                 targets, such as the console, the
325                                 kernel log buffer or a syslog daemon
326                                 will still work however.  Defaults to
327                                 <literal>auto</literal>.</para></listitem>
328                         </varlistentry>
329                 </variablelist>
330
331         </refsect1>
332
333         <refsect1>
334                   <title>See Also</title>
335                   <para>
336                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
337                           <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
338                           <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
339                           <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
340                           <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
341                   </para>
342         </refsect1>
343
344 </refentry>