diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /man/journald.conf.xml | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man/journald.conf.xml')
-rw-r--r-- | man/journald.conf.xml | 131 |
1 files changed, 79 insertions, 52 deletions
diff --git a/man/journald.conf.xml b/man/journald.conf.xml index e150d04..1aa7492 100644 --- a/man/journald.conf.xml +++ b/man/journald.conf.xml @@ -1,6 +1,6 @@ <?xml version='1.0'?> <!--*-nxml-*--> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> <refentry id="journald.conf" @@ -23,14 +23,21 @@ </refnamediv> <refsynopsisdiv> - <para><filename>/etc/systemd/journald.conf</filename></para> - <para><filename>/etc/systemd/journald.conf.d/*.conf</filename></para> - <para><filename>/run/systemd/journald.conf.d/*.conf</filename></para> - <para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para> - <para><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename></para> - <para><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></para> - <para><filename>/run/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></para> - <para><filename>/usr/lib/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></para> + <para><simplelist> + <member><filename>/etc/systemd/journald.conf</filename></member> + <member><filename>/run/systemd/journald.conf</filename></member> + <member><filename>/usr/local/lib/systemd/journald.conf</filename></member> + <member><filename>/usr/lib/systemd/journald.conf</filename></member> + <member><filename>/etc/systemd/journald.conf.d/*.conf</filename></member> + <member><filename>/run/systemd/journald.conf.d/*.conf</filename></member> + <member><filename>/usr/local/lib/systemd/journald.conf.d/*.conf</filename></member> + <member><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></member> + <member><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename></member> + <member><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member> + <member><filename>/run/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member> + <member><filename>/usr/local/lib/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member> + <member><filename>/usr/lib/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member> + </simplelist></para> </refsynopsisdiv> <refsect1> @@ -99,6 +106,10 @@ <para>Note that per-user journal files are not supported unless persistent storage is enabled, thus making <command>journalctl --user</command> unavailable.</para> + <para>The storage to use can also be specified via the <literal>journal.storage</literal> + credential. Values configured via configuration files take priority over values configured via the + credential.</para> + <xi:include href="version-info.xml" xpointer="v186"/> </listitem> </varlistentry> @@ -286,7 +297,7 @@ large individual journal files may grow at most. This influences the granularity in which disk space is made available through rotation, i.e. deletion of historic data. Defaults to one eighth of the values configured with <varname>SystemMaxUse=</varname> and <varname>RuntimeMaxUse=</varname> capped - to 128M, so that usually seven rotated journal files are kept as history. If the journal compact + to 128M, so that usually seven rotated journal files are kept as history. If the journal compact mode is enabled (enabled by default), the maximum file size is capped to 4G.</para> <para>Specify values in bytes or use K, M, G, T, P, E as units for the specified sizes (equal to @@ -366,11 +377,13 @@ <term><varname>ForwardToKMsg=</varname></term> <term><varname>ForwardToConsole=</varname></term> <term><varname>ForwardToWall=</varname></term> + <term><varname>ForwardToSocket=</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, + traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, sent as wall + messages to all logged-in users or sent over a socket. These options take boolean arguments except + for <literal>ForwardToSocket=</literal> which takes an address instead. 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>, @@ -379,22 +392,45 @@ <literal>=</literal> and the following argument, true is assumed. Otherwise, the argument is parsed as a boolean.</para> + <para>The socket forwarding address can be specified with the credential + <literal>journal.forward_to_socket</literal>. The following socket types are supported:</para> + + <para><simplelist type="inline"> + <member><constant>AF_INET</constant> (e.g. <literal>192.168.0.11:4444</literal>)</member> + <member><constant>AF_INET6</constant> (e.g. <literal>[2001:db8::ff00:42:8329]:4444</literal>)</member> + <member><constant>AF_UNIX</constant> (e.g. <literal>/run/host/journal/socket</literal>)</member> + <member><constant>AF_VSOCK</constant> (e.g. <literal>vsock:2:1234</literal>)</member> + </simplelist></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, for example by adding <literal>log_buf_len=8M</literal> to the kernel command line. <command>systemd</command> will automatically disable kernel's rate-limiting applied to userspace - processes (equivalent to setting <literal>printk.devkmsg=on</literal>).</para></listitem> + processes (equivalent to setting <literal>printk.devkmsg=on</literal>).</para> + + <para>When forwarding over a socket the <ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS/#journal-export-format"> + Journal Export Format</ulink> is used when sending over the wire. Notably this includes the metadata + field <varname>__REALTIME_TIMESTAMP</varname> so that + <command>systemd-journal-remote</command> (see + <citerefentry><refentrytitle>systemd-journal-remote.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>) + can be used to receive the forwarded journal entries.</para> <para>Note: Forwarding is performed synchronously within journald, and may significantly affect its performance. This is particularly relevant when using ForwardToConsole=yes in cloud environments, - where the console is often a slow, virtual serial port. Since journald is implemented as a - conventional single-process daemon, forwarding to a completely hung console will block journald. - This can have a cascading effect resulting in any services synchronously logging to the blocked - journal also becoming blocked. Unless actively debugging/developing something, it's generally - preferable to setup a <command>journalctl --follow</command> style service redirected to the + where the console is often a slow, virtual serial port. + Since journald is implemented as a conventional single-process daemon, forwarding to a completely + hung console will block journald. This can have a cascading effect resulting in any services synchronously + logging to the blocked journal also becoming blocked. Unless actively debugging/developing something, it's + generally preferable to setup a <command>journalctl --follow</command> style service redirected to the console, instead of ForwardToConsole=yes, for production use.</para> + </listitem> + + <para>Note: Using <varname>ForwardToSocket=</varname> over IPv4/IPv6 links can be very slow due to the synchronous nature of the sockets. + Take care to ensure your link is a low-latency local link if possible. Typically IP networking is not available everywhere + journald runs, e.g. in the initrd during boot. Consider using <constant>AF_VSOCK</constant>/<constant>AF_UNIX</constant> sockets for this if possible. + </para> </varlistentry> <varlistentry> @@ -403,36 +439,27 @@ <term><varname>MaxLevelKMsg=</varname></term> <term><varname>MaxLevelConsole=</varname></term> <term><varname>MaxLevelWall=</varname></term> - - <listitem><para>Controls the maximum log level of messages - that are stored in the journal, forwarded to syslog, kmsg, the - console or wall (if that is enabled, see above). As argument, - takes one of - <literal>emerg</literal>, - <literal>alert</literal>, - <literal>crit</literal>, - <literal>err</literal>, - <literal>warning</literal>, - <literal>notice</literal>, - <literal>info</literal>, - <literal>debug</literal>, - or integer values in the range of 0–7 (corresponding to the - same levels). Messages equal or below the log level specified - are stored/forwarded, messages above are dropped. Defaults to - <literal>debug</literal> for <varname>MaxLevelStore=</varname> - and <varname>MaxLevelSyslog=</varname>, to ensure that the all - messages are stored in the journal and forwarded to syslog. - Defaults to - <literal>notice</literal> for <varname>MaxLevelKMsg=</varname>, - <literal>info</literal> for <varname>MaxLevelConsole=</varname>, - and <literal>emerg</literal> for - <varname>MaxLevelWall=</varname>. These settings may be - overridden at boot time with the kernel command line options + <term><varname>MaxLevelSocket=</varname></term> + + <listitem><para>Controls the maximum log level of messages that are stored in the journal, forwarded + to syslog, kmsg, the console, the wall, or a socket (if that is enabled, see above). As argument, + takes one of <literal>emerg</literal>, <literal>alert</literal>, <literal>crit</literal>, + <literal>err</literal>, <literal>warning</literal>, <literal>notice</literal>, + <literal>info</literal>, <literal>debug</literal>, or integer values in the range of 0–7 + (corresponding to the same levels). Messages equal or below the log level specified are + stored/forwarded, messages above are dropped. Defaults to <literal>debug</literal> for + <varname>MaxLevelStore=</varname>, <varname>MaxLevelSyslog=</varname> and + <varname>MaxLevelSocket=</varname>, to ensure that the all messages are stored in the journal, + forwarded to syslog and the socket if one exists. Defaults to <literal>notice</literal> for + <varname>MaxLevelKMsg=</varname>, <literal>info</literal> for <varname>MaxLevelConsole=</varname>, + and <literal>emerg</literal> for <varname>MaxLevelWall=</varname>. These settings may be overridden + at boot time with the kernel command line options <literal>systemd.journald.max_level_store=</literal>, <literal>systemd.journald.max_level_syslog=</literal>, <literal>systemd.journald.max_level_kmsg=</literal>, <literal>systemd.journald.max_level_console=</literal>, - <literal>systemd.journald.max_level_wall=</literal>.</para> + <literal>systemd.journald.max_level_wall=</literal>, + <literal>systemd.journald.max_level_socket=</literal>.</para> <xi:include href="version-info.xml" xpointer="v185"/> </listitem> @@ -529,13 +556,13 @@ <refsect1> <title>See Also</title> - <para> - <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, - <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, - <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, - <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>, - <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> - </para> + <para><simplelist type="inline"> + <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> + <member><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> + <member><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> + <member><citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> + <member><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> + </simplelist></para> </refsect1> </refentry> |