teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame 0155-man-document-forwarding-to-syslog-better.patch

Zbigniew Jędrzejewski-Szmek a48f80
From 9d311192671afe6d11e8514b4198a70c23f42457 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek a48f80
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Zbigniew Jędrzejewski-Szmek a48f80
Date: Sat, 9 May 2015 16:20:51 -0500
Zbigniew Jędrzejewski-Szmek a48f80
Subject: [PATCH] man: document forwarding to syslog better
Zbigniew Jędrzejewski-Szmek a48f80
Zbigniew Jędrzejewski-Szmek a48f80
https://bugzilla.redhat.com/show_bug.cgi?id=1147651
Zbigniew Jędrzejewski-Szmek a48f80
(cherry picked from commit 589532d0c61ecd667b0c840ec25faed076f2291e)
Zbigniew Jędrzejewski-Szmek a48f80
---
Zbigniew Jędrzejewski-Szmek a48f80
 man/journald.conf.xml | 70 ++++++++++++++++++++++++++++++++-------------------
Zbigniew Jędrzejewski-Szmek a48f80
 1 file changed, 44 insertions(+), 26 deletions(-)
Zbigniew Jędrzejewski-Szmek a48f80
Zbigniew Jędrzejewski-Szmek a48f80
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
Zbigniew Jędrzejewski-Szmek a48f80
index 85146b0d82..abfe3130dd 100644
Zbigniew Jędrzejewski-Szmek a48f80
--- a/man/journald.conf.xml
Zbigniew Jędrzejewski-Szmek a48f80
+++ b/man/journald.conf.xml
Zbigniew Jędrzejewski-Szmek a48f80
@@ -97,7 +97,7 @@
Zbigniew Jędrzejewski-Szmek a48f80
         needed, so that its existence controls where log data goes.
Zbigniew Jędrzejewski-Szmek a48f80
         <literal>none</literal> turns off all storage, all log data
Zbigniew Jędrzejewski-Szmek a48f80
         received will be dropped. Forwarding to other targets, such as
Zbigniew Jędrzejewski-Szmek a48f80
-        the console, the kernel log buffer or a syslog daemon will
Zbigniew Jędrzejewski-Szmek a48f80
+        the console, the kernel log buffer, or a syslog socket will
Zbigniew Jędrzejewski-Szmek a48f80
         still work however. Defaults to
Zbigniew Jędrzejewski-Szmek a48f80
         <literal>auto</literal>.</para></listitem>
Zbigniew Jędrzejewski-Szmek a48f80
       </varlistentry>
Zbigniew Jędrzejewski-Szmek a48f80
@@ -220,27 +220,19 @@
Zbigniew Jędrzejewski-Szmek a48f80
         journald will stop using more space, but it will not be
Zbigniew Jędrzejewski-Szmek a48f80
         removing existing files to go reduce footprint either.</para>
Zbigniew Jędrzejewski-Szmek a48f80
 
Zbigniew Jędrzejewski-Szmek a48f80
-        <para><varname>SystemMaxFileSize=</varname>
Zbigniew Jędrzejewski-Szmek a48f80
-        and
Zbigniew Jędrzejewski-Szmek a48f80
-        <varname>RuntimeMaxFileSize=</varname>
Zbigniew Jędrzejewski-Szmek a48f80
-        control how large individual journal
Zbigniew Jędrzejewski-Szmek a48f80
-        files may grow at maximum. This
Zbigniew Jędrzejewski-Szmek a48f80
-        influences the granularity in which
Zbigniew Jędrzejewski-Szmek a48f80
-        disk space is made available through
Zbigniew Jędrzejewski-Szmek a48f80
-        rotation, i.e. deletion of historic
Zbigniew Jędrzejewski-Szmek a48f80
-        data. Defaults to one eighth of the
Zbigniew Jędrzejewski-Szmek a48f80
-        values configured with
Zbigniew Jędrzejewski-Szmek a48f80
+        <para><varname>SystemMaxFileSize=</varname> and
Zbigniew Jędrzejewski-Szmek a48f80
+        <varname>RuntimeMaxFileSize=</varname> control how large
Zbigniew Jędrzejewski-Szmek a48f80
+        individual journal files may grow at maximum. This influences
Zbigniew Jędrzejewski-Szmek a48f80
+        the granularity in which disk space is made available through
Zbigniew Jędrzejewski-Szmek a48f80
+        rotation, i.e. deletion of historic data. Defaults to one
Zbigniew Jędrzejewski-Szmek a48f80
+        eighth of the values configured with
Zbigniew Jędrzejewski-Szmek a48f80
         <varname>SystemMaxUse=</varname> and
Zbigniew Jędrzejewski-Szmek a48f80
-        <varname>RuntimeMaxUse=</varname>, so
Zbigniew Jędrzejewski-Szmek a48f80
-        that usually seven rotated journal
Zbigniew Jędrzejewski-Szmek a48f80
-        files are kept as history. Specify
Zbigniew Jędrzejewski-Szmek a48f80
-        values in bytes or use K, M, G, T, P,
Zbigniew Jędrzejewski-Szmek a48f80
-        E as units for the specified sizes
Zbigniew Jędrzejewski-Szmek a48f80
-        (equal to 1024, 1024²,... bytes).
Zbigniew Jędrzejewski-Szmek a48f80
-        Note that size limits are enforced
Zbigniew Jędrzejewski-Szmek a48f80
-        synchronously when journal files are
Zbigniew Jędrzejewski-Szmek a48f80
-        extended, and no explicit rotation
Zbigniew Jędrzejewski-Szmek a48f80
-        step triggered by time is
Zbigniew Jędrzejewski-Szmek a48f80
+        <varname>RuntimeMaxUse=</varname>, so that usually seven
Zbigniew Jędrzejewski-Szmek a48f80
+        rotated journal files are kept as history. Specify values in
Zbigniew Jędrzejewski-Szmek a48f80
+        bytes or use K, M, G, T, P, E as units for the specified sizes
Zbigniew Jędrzejewski-Szmek a48f80
+        (equal to 1024, 1024²,... bytes).  Note that size limits are
Zbigniew Jędrzejewski-Szmek a48f80
+        enforced synchronously when journal files are extended, and no
Zbigniew Jędrzejewski-Szmek a48f80
+        explicit rotation step triggered by time is
Zbigniew Jędrzejewski-Szmek a48f80
         needed.</para></listitem>
Zbigniew Jędrzejewski-Szmek a48f80
       </varlistentry>
Zbigniew Jędrzejewski-Szmek a48f80
 
Zbigniew Jędrzejewski-Szmek a48f80
@@ -308,13 +300,13 @@
Zbigniew Jędrzejewski-Szmek a48f80
         daemon, to the kernel log buffer (kmsg), to the system
Zbigniew Jędrzejewski-Szmek a48f80
         console, or sent as wall messages to all logged-in users.
Zbigniew Jędrzejewski-Szmek a48f80
         These options take boolean arguments. If forwarding to syslog
Zbigniew Jędrzejewski-Szmek a48f80
-        is enabled but no syslog daemon is running, the respective
Zbigniew Jędrzejewski-Szmek a48f80
-        option has no effect. By default, only forwarding wall is
Zbigniew Jędrzejewski-Szmek a48f80
-        enabled. These settings may be overridden at boot time with
Zbigniew Jędrzejewski-Szmek a48f80
-        the kernel command line options
Zbigniew Jędrzejewski-Szmek a48f80
+        is enabled but nothing reads messages from the socket,
Zbigniew Jędrzejewski-Szmek a48f80
+        forwarding to syslog has no effect. By default, only
Zbigniew Jędrzejewski-Szmek a48f80
+        forwarding to wall is enabled. These settings may be
Zbigniew Jędrzejewski-Szmek a48f80
+        overridden at boot time with the kernel command line options
Zbigniew Jędrzejewski-Szmek a48f80
         <literal>systemd.journald.forward_to_syslog=</literal>,
Zbigniew Jędrzejewski-Szmek a48f80
         <literal>systemd.journald.forward_to_kmsg=</literal>,
Zbigniew Jędrzejewski-Szmek a48f80
-        <literal>systemd.journald.forward_to_console=</literal> and
Zbigniew Jędrzejewski-Szmek a48f80
+        <literal>systemd.journald.forward_to_console=</literal>, and
Zbigniew Jędrzejewski-Szmek a48f80
         <literal>systemd.journald.forward_to_wall=</literal>. When
Zbigniew Jędrzejewski-Szmek a48f80
         forwarding to the console, the TTY to log to can be changed
Zbigniew Jędrzejewski-Szmek a48f80
         with <varname>TTYPath=</varname>, described
Zbigniew Jędrzejewski-Szmek a48f80
@@ -366,6 +358,32 @@
Zbigniew Jędrzejewski-Szmek a48f80
   </refsect1>
Zbigniew Jędrzejewski-Szmek a48f80
 
Zbigniew Jędrzejewski-Szmek a48f80
   <refsect1>
Zbigniew Jędrzejewski-Szmek a48f80
+    <title>Forwarding to traditional syslog daemons</title>
Zbigniew Jędrzejewski-Szmek a48f80
+
Zbigniew Jędrzejewski-Szmek a48f80
+    <para>
Zbigniew Jędrzejewski-Szmek a48f80
+      Journal events can be transfered to a different logging daemon
Zbigniew Jędrzejewski-Szmek a48f80
+      in two different ways. In the first method, messages are
Zbigniew Jędrzejewski-Szmek a48f80
+      immediately forwarded to a socket
Zbigniew Jędrzejewski-Szmek a48f80
+      (<filename>/run/systemd/journal/syslog</filename>), where the
Zbigniew Jędrzejewski-Szmek a48f80
+      traditional syslog daemon can read them. This method is
Zbigniew Jędrzejewski-Szmek a48f80
+      controlled by <varname>ForwardToSyslog=</varname> option.  In a
Zbigniew Jędrzejewski-Szmek a48f80
+      second method, a syslog daemon behaves like a normal journal
Zbigniew Jędrzejewski-Szmek a48f80
+      client, and reads messages from the journal files, similarly to
Zbigniew Jędrzejewski-Szmek a48f80
+      <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
Zbigniew Jędrzejewski-Szmek a48f80
+      In this method, messages do not have to be read immediately,
Zbigniew Jędrzejewski-Szmek a48f80
+      which allows a logging daemon which is only started late in boot
Zbigniew Jędrzejewski-Szmek a48f80
+      to access all messages since the start of the system. In
Zbigniew Jędrzejewski-Szmek a48f80
+      addition, full structured meta-data is available to it. This
Zbigniew Jędrzejewski-Szmek a48f80
+      method of course is available only if the messages are stored in
Zbigniew Jędrzejewski-Szmek a48f80
+      a journal file at all. So it will work if
Zbigniew Jędrzejewski-Szmek a48f80
+      <varname>Storage=none</varname> is set. It should be noted that
Zbigniew Jędrzejewski-Szmek a48f80
+      usualy the <emphasis>second</emphasis> method is used by syslog
Zbigniew Jędrzejewski-Szmek a48f80
+      daemons, so the <varname>Storage=</varname> option, and not the
Zbigniew Jędrzejewski-Szmek a48f80
+      <varname>ForwardToSyslog=</varname> option, is relevant for them.
Zbigniew Jędrzejewski-Szmek a48f80
+    </para>
Zbigniew Jędrzejewski-Szmek a48f80
+  </refsect1>
Zbigniew Jędrzejewski-Szmek a48f80
+
Zbigniew Jędrzejewski-Szmek a48f80
+  <refsect1>
Zbigniew Jędrzejewski-Szmek a48f80
       <title>See Also</title>
Zbigniew Jędrzejewski-Szmek a48f80
       <para>
Zbigniew Jędrzejewski-Szmek a48f80
         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,