]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/journald.conf.xml
pid1: use LOG_DEBUG/INFO/NOTICE for unit resource consumption message
[thirdparty/systemd.git] / man / journald.conf.xml
index 8974f8f8d5306fe0d53ac5fe8d1b0ac9990e7c3f..44fd0d2f3d7165e61a52bc7499e83c52368a85c7 100644 (file)
@@ -1,40 +1,13 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<!--
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
--->
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
 
 <refentry id="journald.conf"
     xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
     <title>journald.conf</title>
     <productname>systemd</productname>
-
-    <authorgroup>
-      <author>
-        <contrib>Developer</contrib>
-        <firstname>Lennart</firstname>
-        <surname>Poettering</surname>
-        <email>lennart@poettering.net</email>
-      </author>
-    </authorgroup>
   </refentryinfo>
 
   <refmeta>
   <refsect1>
     <title>Description</title>
 
-    <para>These files configure various parameters of the systemd
-    journal service,
-    <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+    <para>These files configure various parameters of the systemd journal service,
+    <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+    See
+    <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+    for a general description of the syntax.</para>
 
   </refsect1>
 
@@ -72,7 +47,7 @@
     <para>All options are configured in the
     <literal>[Journal]</literal> section:</para>
 
-    <variablelist>
+    <variablelist class='config-directives'>
 
       <varlistentry>
         <term><varname>Storage=</varname></term>
       <varlistentry>
         <term><varname>Compress=</varname></term>
 
-        <listitem><para>Takes a boolean value. If enabled (the
-        default), data objects that shall be stored in the journal and
-        are larger than a certain threshold are compressed before they
-        are written to the file system.</para></listitem>
+        <listitem><para>Can take a boolean value. If enabled (the
+        default), data objects that shall be stored in the journal
+        and are larger than the default threshold of 512 bytes are
+        compressed before they are written to the file system. It
+        can also be set to a number of bytes to specify the
+        compression threshold directly. Suffixes like K, M, and G
+        can be used to specify larger units.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         interval is over. A message about the number of dropped
         messages is generated. This rate limiting is applied
         per-service, so that two services which log do not interfere
-        with each other's limits. Defaults to 1000 messages in 30s.
+        with each other's limits. Defaults to 10000 messages in 30s.
         The time specification for
         <varname>RateLimitIntervalSec=</varname> may be specified in the
         following units: <literal>s</literal>, <literal>min</literal>,
         <literal>h</literal>, <literal>ms</literal>,
         <literal>us</literal>. To turn off any kind of rate limiting,
-        set either value to 0.</para></listitem>
+        set either value to 0.</para>
+
+        <para>If a service provides rate limits for itself through
+        <varname>LogRateLimitIntervalSec=</varname> and/or <varname>LogRateLimitBurst=</varname>
+        in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+        those values will override the settings specified here.</para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
         subsequently something else causes the file system to fill up,
         journald will stop using more space, but it will not be
         removing existing files to reduce the footprint again,
-        either.</para>
+        either. Also note that only archived files are deleted to reduce the
+        space occupied by journal files. This means that, in effect, there might
+        still be more space used than <varname>SystemMaxUse=</varname> or
+        <varname>RuntimeMaxUse=</varname> limit after a vacuuming operation is
+        complete.</para>
 
         <para><varname>SystemMaxFileSize=</varname> and
         <varname>RuntimeMaxFileSize=</varname> control how large
 
         <listitem><para>The maximum time to store journal entries.
         This controls whether journal files containing entries older
-        then the specified time span are deleted. Normally, time-based
+        than the specified time span are deleted. Normally, time-based
         deletion of old journal files should not be required as
         size-based deletion with options such as
         <varname>SystemMaxUse=</varname> should be sufficient to
         seconds.</para></listitem>
       </varlistentry>
 
-
       <varlistentry>
         <term><varname>SyncIntervalSec=</varname></term>
 
         <term><varname>ForwardToConsole=</varname></term>
         <term><varname>ForwardToWall=</varname></term>
 
-        <listitem><para>Control whether log messages received by the journal daemon shall
-        be forwarded to a traditional syslog daemon, to the kernel log buffer (kmsg), to
-        the system console, or sent as wall messages to all logged-in users.  These
-        options take boolean arguments. If forwarding to syslog is enabled but nothing
-        reads messages from the socket, forwarding to syslog has no effect. By default,
-        only forwarding to wall is enabled. These settings may be overridden at boot time
-        with the kernel command line options
-        <literal>systemd.journald.forward_to_syslog</literal>,
+        <listitem><para>Control whether log messages received by the journal daemon shall be forwarded to a
+        traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, or sent as wall
+        messages to all logged-in users.  These options take boolean arguments. If forwarding to syslog is
+        enabled but nothing reads messages from the socket, forwarding to syslog has no effect. By default,
+        only forwarding to wall is enabled. These settings may be overridden at boot time with the kernel
+        command line options <literal>systemd.journald.forward_to_syslog</literal>,
         <literal>systemd.journald.forward_to_kmsg</literal>,
         <literal>systemd.journald.forward_to_console</literal>, and
-        <literal>systemd.journald.forward_to_wall</literal>. If the option name is
-        specified without <literal>=</literal> and the following argument, true is
-        assumed. Otherwise, the argument is parsed as a boolean. When forwarding to the
-        console, the TTY to log to can be changed with <varname>TTYPath=</varname>,
-        described below.</para></listitem>
+        <literal>systemd.journald.forward_to_wall</literal>. If the option name is specified without
+        <literal>=</literal> and the following argument, true is assumed. Otherwise, the argument is parsed
+        as a boolean.</para>
+
+        <para>When forwarding to the console, the TTY to log to can be changed with
+        <varname>TTYPath=</varname>, described below.</para>
+
+        <para>When forwarding to the kernel log buffer (kmsg), make sure to select a suitably large size for
+        the log buffer, and ensure the kernel's rate-limiting applied to userspace processes is turned
+        off. Specifically, add <literal>log_buf_len=8M</literal> and <literal>printk.devkmsg=on</literal> (or
+        similar) to the kernel command line.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <listitem><para>The maximum line length to permit when converting stream logs into record logs. When a systemd
         unit's standard output/error are connected to the journal via a stream socket, the data read is split into
         individual log records at newline (<literal>\n</literal>, ASCII 10) and NUL characters. If no such delimiter is
-        read for the specified number of bytes a hard log record boundary is artifically inserted, breaking up overly
+        read for the specified number of bytes a hard log record boundary is artificially inserted, breaking up overly
         long lines into multiple log records. Selecting overly large values increases the possible memory usage of the
         Journal daemon for each stream client, as in the worst case the journal daemon needs to buffer the specified
         number of bytes in memory before it can flush a new log record to disk. Also note that permitting overly large