[systemd-commits] 5 commits - Makefile.am man/journalctl.xml man/journald.conf.xml man/loginctl.xml man/logind.conf.xml man/pam_systemd.xml man/systemd-journald.service.xml man/systemd-logind.service.xml src/core src/journal src/shared TODO units/systemd-journald.service.in units/systemd-logind.service.in

Lennart Poettering lennart at kemper.freedesktop.org
Fri Jun 1 08:27:24 PDT 2012


 Makefile.am                       |    8 ++
 TODO                              |    6 --
 man/journalctl.xml                |    8 +-
 man/journald.conf.xml             |   53 +++++++++++++++++-
 man/loginctl.xml                  |    3 -
 man/logind.conf.xml               |    5 +
 man/pam_systemd.xml               |   15 +++--
 man/systemd-journald.service.xml  |  110 ++++++++++++++++++++++++++++++++++++++
 man/systemd-logind.service.xml    |   98 +++++++++++++++++++++++++++++++++
 src/core/load-fragment.c          |   55 -------------------
 src/core/load-fragment.h          |    2 
 src/journal/journald-gperf.gperf  |    5 +
 src/journal/journald.c            |   47 ++++++++++++----
 src/journal/journald.conf         |    5 +
 src/journal/journald.h            |    7 ++
 src/shared/conf-parser.c          |   57 +++++++++++++++++++
 src/shared/conf-parser.h          |    2 
 units/systemd-journald.service.in |    5 -
 units/systemd-logind.service.in   |    2 
 19 files changed, 401 insertions(+), 92 deletions(-)

New commits:
commit 63cb20a28b3f5e858a306daf7e0657ccbb0ab163
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jun 1 17:26:28 2012 +0200

    units: fix man section

diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index d169b44..88ee68c 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -7,11 +7,10 @@
 
 [Unit]
 Description=Journal Service
-Documentation=man:systemd-journald.service(7) man:journald.conf(5)
+Documentation=man:systemd-journald.service(8) man:journald.conf(5)
 DefaultDependencies=no
 Requires=systemd-journald.socket
-After=systemd-journald.socket
-After=syslog.socket
+After=systemd-journald.socket syslog.socket
 
 [Service]
 ExecStart=@rootlibexecdir@/systemd-journald

commit 213ba152fdf7978773be5b8a72e040584765137f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jun 1 17:26:16 2012 +0200

    journal: allow setting of a cutoff log level for disk storage, syslog, kmsg, console forwarding

diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 28ad2ed..5d07509 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -225,6 +225,42 @@
                         </varlistentry>
 
                         <varlistentry>
+                                <term><varname>MaxLevelStore=</varname></term>
+                                <term><varname>MaxLevelSyslog=</varname></term>
+                                <term><varname>MaxLevelKMsg=</varname></term>
+                                <term><varname>MaxLevelConsole=</varname></term>
+
+                                <listitem><para>Controls the maximum
+                                log level of messages that are stored
+                                on disk, forwarded to syslog, kmsg or
+                                the console (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
+                                written to disk and forwarded to
+                                syslog. Defaults to
+                                <literal>notice</literal> for
+                                <varname>MaxLevelKMsg=</varname> and
+                                <literal>info</literal> for
+                                <varname>MaxLevelConsole=</varname>.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
                                 <term><varname>TTYPath=</varname></term>
 
                                 <listitem><para>Change the console TTY
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 2db1290..5494d7b 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -637,61 +637,6 @@ int config_parse_socket_bindtodevice(
 DEFINE_CONFIG_PARSE_ENUM(config_parse_output, exec_output, ExecOutput, "Failed to parse output specifier");
 DEFINE_CONFIG_PARSE_ENUM(config_parse_input, exec_input, ExecInput, "Failed to parse input specifier");
 
-int config_parse_facility(
-                const char *filename,
-                unsigned line,
-                const char *section,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-
-        int *o = data, x;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        if ((x = log_facility_unshifted_from_string(rvalue)) < 0) {
-                log_error("[%s:%u] Failed to parse log facility, ignoring: %s", filename, line, rvalue);
-                return 0;
-        }
-
-        *o = (x << 3) | LOG_PRI(*o);
-
-        return 0;
-}
-
-int config_parse_level(
-                const char *filename,
-                unsigned line,
-                const char *section,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-
-        int *o = data, x;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        if ((x = log_level_from_string(rvalue)) < 0) {
-                log_error("[%s:%u] Failed to parse log level, ignoring: %s", filename, line, rvalue);
-                return 0;
-        }
-
-        *o = (*o & LOG_FACMASK) | x;
-        return 0;
-}
-
 int config_parse_exec_io_class(
                 const char *filename,
                 unsigned line,
diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
index b412d3b..aa48ebd 100644
--- a/src/core/load-fragment.h
+++ b/src/core/load-fragment.h
@@ -47,8 +47,6 @@ int config_parse_service_restart(const char *filename, unsigned line, const char
 int config_parse_socket_bindtodevice(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_output(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_input(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-int config_parse_facility(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-int config_parse_level(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_exec_io_class(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_exec_io_priority(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_exec_cpu_sched_policy(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/journal/journald-gperf.gperf b/src/journal/journald-gperf.gperf
index 9c778fc..c9b0fbb 100644
--- a/src/journal/journald-gperf.gperf
+++ b/src/journal/journald-gperf.gperf
@@ -30,3 +30,7 @@ Journal.ForwardToKMsg,      config_parse_bool,      0, offsetof(Server, forward_
 Journal.ForwardToConsole,   config_parse_bool,      0, offsetof(Server, forward_to_console)
 Journal.ImportKernel,       config_parse_bool,      0, offsetof(Server, import_proc_kmsg)
 Journal.TTYPath,            config_parse_path,      0, offsetof(Server, tty_path)
+Journal.MaxLevelStore,      config_parse_level,     0, offsetof(Server, max_level_store)
+Journal.MaxLevelSyslog,     config_parse_level,     0, offsetof(Server, max_level_syslog)
+Journal.MaxLevelKMsg,       config_parse_level,     0, offsetof(Server, max_level_kmsg)
+Journal.MaxLevelConsole,    config_parse_level,     0, offsetof(Server, max_level_console)
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 0e27582..795b235 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -720,6 +720,9 @@ static void dispatch_message(Server *s,
         if (n == 0)
                 return;
 
+        if (LOG_PRI(priority) > s->max_level_store)
+                return;
+
         if (!ucred)
                 goto finish;
 
@@ -829,12 +832,15 @@ static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned
         log_debug("Failed to forward syslog message: %m");
 }
 
-static void forward_syslog_raw(Server *s, const char *buffer, struct ucred *ucred, struct timeval *tv) {
+static void forward_syslog_raw(Server *s, int priority, const char *buffer, struct ucred *ucred, struct timeval *tv) {
         struct iovec iovec;
 
         assert(s);
         assert(buffer);
 
+        if (LOG_PRI(priority) > s->max_level_syslog)
+                return;
+
         IOVEC_SET_STRING(iovec, buffer);
         forward_syslog_iovec(s, &iovec, 1, ucred, tv);
 }
@@ -852,6 +858,9 @@ static void forward_syslog(Server *s, int priority, const char *identifier, cons
         assert(priority <= 999);
         assert(message);
 
+        if (LOG_PRI(priority) > s->max_level_syslog)
+                return;
+
         /* First: priority field */
         snprintf(header_priority, sizeof(header_priority), "<%i>", priority);
         char_array_0(header_priority);
@@ -913,6 +922,9 @@ static void forward_kmsg(Server *s, int priority, const char *identifier, const
         assert(priority <= 999);
         assert(message);
 
+        if (LOG_PRI(priority) > s->max_level_kmsg)
+                return;
+
         /* Never allow messages with kernel facility to be written to
          * kmsg, regardless where the data comes from. */
         priority = fixup_priority(priority);
@@ -960,7 +972,7 @@ finish:
         free(ident_buf);
 }
 
-static void forward_console(Server *s, const char *identifier, const char *message, struct ucred *ucred) {
+static void forward_console(Server *s, int priority, const char *identifier, const char *message, struct ucred *ucred) {
         struct iovec iovec[4];
         char header_pid[16];
         int n = 0, fd;
@@ -970,6 +982,9 @@ static void forward_console(Server *s, const char *identifier, const char *messa
         assert(s);
         assert(message);
 
+        if (LOG_PRI(priority) > s->max_level_console)
+                return;
+
         /* First: identifier and PID */
         if (ucred) {
                 if (!identifier) {
@@ -1066,14 +1081,17 @@ static void process_syslog_message(Server *s, const char *buf, struct ucred *ucr
         unsigned n = 0;
         int priority = LOG_USER | LOG_INFO;
         char *identifier = NULL, *pid = NULL;
+        const char *orig;
 
         assert(s);
         assert(buf);
 
+        orig = buf;
+        parse_syslog_priority((char**) &buf, &priority);
+
         if (s->forward_to_syslog)
-                forward_syslog_raw(s, buf, ucred, tv);
+                forward_syslog_raw(s, priority, orig, ucred, tv);
 
-        parse_syslog_priority((char**) &buf, &priority);
         skip_syslog_date((char**) &buf);
         read_identifier(&buf, &identifier, &pid);
 
@@ -1081,7 +1099,7 @@ static void process_syslog_message(Server *s, const char *buf, struct ucred *ucr
                 forward_kmsg(s, priority, identifier, buf, ucred);
 
         if (s->forward_to_console)
-                forward_console(s, identifier, buf, ucred);
+                forward_console(s, priority, identifier, buf, ucred);
 
         IOVEC_SET_STRING(iovec[n++], "_TRANSPORT=syslog");
 
@@ -1333,7 +1351,7 @@ static void process_native_message(
                         forward_kmsg(s, priority, identifier, message, ucred);
 
                 if (s->forward_to_console)
-                        forward_console(s, identifier, message, ucred);
+                        forward_console(s, priority, identifier, message, ucred);
         }
 
         dispatch_message(s, iovec, n, m, ucred, tv, label, label_len, priority);
@@ -1431,7 +1449,7 @@ static int stdout_stream_log(StdoutStream *s, const char *p) {
                 forward_kmsg(s->server, priority, s->identifier, p, &s->ucred);
 
         if (s->forward_to_console || s->server->forward_to_console)
-                forward_console(s->server, s->identifier, p, &s->ucred);
+                forward_console(s->server, priority, s->identifier, p, &s->ucred);
 
         IOVEC_SET_STRING(iovec[n++], "_TRANSPORT=stdout");
 
@@ -2655,6 +2673,11 @@ static int server_init(Server *s) {
         s->forward_to_syslog = true;
         s->import_proc_kmsg = true;
 
+        s->max_level_store = LOG_DEBUG;
+        s->max_level_syslog = LOG_DEBUG;
+        s->max_level_kmsg = LOG_NOTICE;
+        s->max_level_console = LOG_INFO;
+
         memset(&s->system_metrics, 0xFF, sizeof(s->system_metrics));
         memset(&s->runtime_metrics, 0xFF, sizeof(s->runtime_metrics));
 
diff --git a/src/journal/journald.conf b/src/journal/journald.conf
index 4331811..97e648e 100644
--- a/src/journal/journald.conf
+++ b/src/journal/journald.conf
@@ -24,3 +24,7 @@
 #ForwardToConsole=no
 #ImportKernel=yes
 #TTYPath=/dev/console
+#MaxLevelStore=debug
+#MaxLevelSyslog=debug
+#MaxLevelKMsg=notice
+#MaxLevelConsole=info
diff --git a/src/journal/journald.h b/src/journal/journald.h
index 04ebf30..159364d 100644
--- a/src/journal/journald.h
+++ b/src/journal/journald.h
@@ -81,6 +81,11 @@ typedef struct Server {
         unsigned n_stdout_streams;
 
         char *tty_path;
+
+        int max_level_store;
+        int max_level_syslog;
+        int max_level_kmsg;
+        int max_level_console;
 } Server;
 
 /* gperf lookup function */
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 724bcf0..8c62fb9 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -876,3 +876,60 @@ int config_parse_mode(
         *m = (mode_t) l;
         return 0;
 }
+
+int config_parse_facility(
+                const char *filename,
+                unsigned line,
+                const char *section,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+
+        int *o = data, x;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        x = log_facility_unshifted_from_string(rvalue);
+        if (x < 0) {
+                log_error("[%s:%u] Failed to parse log facility, ignoring: %s", filename, line, rvalue);
+                return 0;
+        }
+
+        *o = (x << 3) | LOG_PRI(*o);
+
+        return 0;
+}
+
+int config_parse_level(
+                const char *filename,
+                unsigned line,
+                const char *section,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+
+        int *o = data, x;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        x = log_level_from_string(rvalue);
+        if (x < 0) {
+                log_error("[%s:%u] Failed to parse log level, ignoring: %s", filename, line, rvalue);
+                return 0;
+        }
+
+        *o = (*o & LOG_FACMASK) | x;
+        return 0;
+}
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index 9e5f81d..2e01f9e 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -104,6 +104,8 @@ int config_parse_path_strv(const char *filename, unsigned line, const char *sect
 int config_parse_usec(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_nsec(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_mode(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_facility(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_level(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 
 #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg)                \
         int function(                                                   \

commit 0d9243f022d244632b1ab26cfc8b46794b7fc5d6
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jun 1 01:06:10 2012 +0200

    journal: support changing the console tty to forward to

diff --git a/TODO b/TODO
index 7eaff7a..1d30869 100644
--- a/TODO
+++ b/TODO
@@ -31,8 +31,6 @@ Features:
 
 * nspawn: make use of device cgroup contrller by default
 
-* parse kernel cmdline option for capability bset
-
 * journalctl /dev/sda, journalctl --device=b12:8 (--device=n12, --device=+usb:1-1)
 
 * make use of /sys/power/wake_lock in inhibitors
@@ -41,8 +39,6 @@ Features:
 
 * make sure show-logs checks for utf8 validity, not ascii validity
 
-* add TimerSlackNS to system.conf to set system-wide caps bounds
-
 * when breaking cycles drop sysv services first, then services from /run, then from /etc, then from /usr
 
 * readahead: when bumping /sys readahead variable save mtime and compare later to detect changes
@@ -104,8 +100,6 @@ Features:
 
 * Auke: merge Auke's bootchart
 
-* journald: allow forwarding of log data to specific TTY instead of console
-
 * udev: move to LGPL
 
 * udev systemd unify:
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 5ad0f02..28ad2ed 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -225,6 +225,16 @@
                         </varlistentry>
 
                         <varlistentry>
+                                <term><varname>TTYPath=</varname></term>
+
+                                <listitem><para>Change the console TTY
+                                to use if
+                                <varname>ForwardToConsole=yes</varname>
+                                is used. Defaults to
+                                <filename>/dev/console</filename>.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
                                 <term><varname>ImportKernel=</varname></term>
 
                                 <listitem><para>Controls whether
diff --git a/src/journal/journald-gperf.gperf b/src/journal/journald-gperf.gperf
index a56f6d9..9c778fc 100644
--- a/src/journal/journald-gperf.gperf
+++ b/src/journal/journald-gperf.gperf
@@ -29,3 +29,4 @@ Journal.ForwardToSyslog,    config_parse_bool,      0, offsetof(Server, forward_
 Journal.ForwardToKMsg,      config_parse_bool,      0, offsetof(Server, forward_to_kmsg)
 Journal.ForwardToConsole,   config_parse_bool,      0, offsetof(Server, forward_to_console)
 Journal.ImportKernel,       config_parse_bool,      0, offsetof(Server, import_proc_kmsg)
+Journal.TTYPath,            config_parse_path,      0, offsetof(Server, tty_path)
diff --git a/src/journal/journald.c b/src/journal/journald.c
index e0e7cce..0e27582 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -965,6 +965,7 @@ static void forward_console(Server *s, const char *identifier, const char *messa
         char header_pid[16];
         int n = 0, fd;
         char *ident_buf = NULL;
+        const char *tty;
 
         assert(s);
         assert(message);
@@ -992,14 +993,16 @@ static void forward_console(Server *s, const char *identifier, const char *messa
         IOVEC_SET_STRING(iovec[n++], message);
         IOVEC_SET_STRING(iovec[n++], "\n");
 
-        fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
+        tty = s->tty_path ? s->tty_path : "/dev/console";
+
+        fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC);
         if (fd < 0) {
-                log_debug("Failed to open /dev/console for logging: %s", strerror(errno));
+                log_debug("Failed to open %s for logging: %s", tty, strerror(errno));
                 goto finish;
         }
 
         if (writev(fd, iovec, n) < 0)
-                log_debug("Failed to write to /dev/console for logging: %s", strerror(errno));
+                log_debug("Failed to write to %s for logging: %s", tty, strerror(errno));
 
         close_nointr_nofail(fd);
 
@@ -2782,6 +2785,7 @@ static void server_done(Server *s) {
                 journal_rate_limit_free(s->rate_limit);
 
         free(s->buffer);
+        free(s->tty_path);
 }
 
 int main(int argc, char *argv[]) {
diff --git a/src/journal/journald.conf b/src/journal/journald.conf
index 95534dc..4331811 100644
--- a/src/journal/journald.conf
+++ b/src/journal/journald.conf
@@ -23,3 +23,4 @@
 #ForwardToKMsg=no
 #ForwardToConsole=no
 #ImportKernel=yes
+#TTYPath=/dev/console
diff --git a/src/journal/journald.h b/src/journal/journald.h
index 3c69f7e..04ebf30 100644
--- a/src/journal/journald.h
+++ b/src/journal/journald.h
@@ -79,6 +79,8 @@ typedef struct Server {
 
         LIST_HEAD(StdoutStream, stdout_streams);
         unsigned n_stdout_streams;
+
+        char *tty_path;
 } Server;
 
 /* gperf lookup function */

commit 01cf0ca850dd1c21e1c405a4493fe61d0c28d721
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jun 1 01:05:38 2012 +0200

    man: document systemd-journal

diff --git a/Makefile.am b/Makefile.am
index 2e29a0f..597711e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -499,6 +499,7 @@ MANPAGES = \
 	man/systemd-machine-id-setup.1 \
 	man/systemd-detect-virt.1 \
 	man/journald.conf.5 \
+	man/systemd-journald.service.8 \
 	man/journalctl.1 \
 	man/systemd-inhibit.1
 
@@ -507,13 +508,15 @@ MANPAGES_ALIAS = \
 	man/poweroff.8 \
 	man/init.1 \
 	man/systemd-modules-load.8 \
-	man/systemd-sysctl.8
+	man/systemd-sysctl.8 \
+	man/systemd-journald.8
 
 man/reboot.8: man/halt.8
 man/poweroff.8: man/halt.8
 man/init.1: man/systemd.1
 man/systemd-modules-load.8: man/systemd-modules-load.service.8
 man/systemd-sysctl.8: man/systemd-sysctl.service.8
+man/systemd-journald.8: man/systemd-journald.service.8
 
 XML_FILES = \
 	${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
diff --git a/man/journalctl.xml b/man/journalctl.xml
index 5e0c6dd..de02e4e 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -56,10 +56,11 @@
         <refsect1>
                 <title>Description</title>
 
-                <para><command>journalctl</command> may be
-                used to query the contents of the
+                <para><command>journalctl</command> may be used to
+                query the contents of the
                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                journal.</para>
+                journal as written by
+                <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
 
                 <para>If called without parameter will show the full
                 contents of the journal, starting with the oldest
@@ -254,6 +255,7 @@
                 <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>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index cce945b..5ad0f02 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -48,13 +48,15 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>journald.conf</filename></para>
+                <para><filename>/etc/systemd/journald.conf</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
                 <title>Description</title>
 
-                <para>This files configures various parameters of the systemd journal service.</para>
+                <para>This files configures various parameters of the
+                systemd journal service
+                <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
 
         </refsect1>
 
@@ -246,6 +248,7 @@
                   <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.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
diff --git a/man/logind.conf.xml b/man/logind.conf.xml
index 0d0c9b0..33ddf62 100644
--- a/man/logind.conf.xml
+++ b/man/logind.conf.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>logind.conf</filename></para>
+                <para><filename>/etc/systemd/logind.conf</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd-journald.service.xml b/man/systemd-journald.service.xml
new file mode 100644
index 0000000..202ea00
--- /dev/null
+++ b/man/systemd-journald.service.xml
@@ -0,0 +1,110 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//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/>.
+-->
+
+<refentry id="systemd-journald.service">
+
+        <refentryinfo>
+                <title>systemd-journald</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart at poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>systemd-journald</refentrytitle>
+                <manvolnum>8</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>systemd-journald.service</refname>
+                <refname>systemd-journald</refname>
+                <refpurpose>systemd Journal Service</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <para><filename>systemd-journald.service</filename></para>
+                <para><filename>/usr/lib/systemd/systemd-journald</filename></para>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><filename>systemd-journald</filename> is a
+                system service that collects and stores logging
+                data. It creates and maintains structured, indexed
+                journals based on logging information that is received
+                from the kernel, from user processes via the libc
+                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                call, from STDOUT/STDERR of system services or via its
+                native API. It will implicitly collect numerous meta
+                data fields for each log messages in a secure and
+                unfakeable way. See
+                <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                for more information about the collected meta data.
+                </para>
+
+                <para>Log data collected by the journal is primarily
+                text based but can also include binary data where
+                necessary. All objects stored in the journal can be up
+                to 2^64-1 bytes in size.</para>
+
+                <para>By default the journal stores log data in
+                <filename>/run/log/journal/</filename>. Since
+                <filename>/run/</filename> is volatile log data is
+                lost at reboot. To make the data persistant it
+                is sufficient to create
+                <filename>/var/log/journal/</filename> where
+                <filename>systemd-journald</filename> will then store
+                the data.</para>
+
+                <para><filename>systemd-journald</filename> will
+                forward all received log messages to the AF_UNIX
+                SOCK_DGRAM socket
+                <filename>/run/systemd/journal/syslog</filename> (if it exists) which
+                may be used by UNIX syslog daemons to process the data
+                further.</para>
+
+                <para>See
+                <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                for information about the configuration of this
+                service.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index da07cb9..d169b44 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -7,7 +7,7 @@
 
 [Unit]
 Description=Journal Service
-Documentation=man:journald.conf(5)
+Documentation=man:systemd-journald.service(7) man:journald.conf(5)
 DefaultDependencies=no
 Requires=systemd-journald.socket
 After=systemd-journald.socket

commit af3bccd6d87759f0b146bf5980bdd56144d70c7e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jun 1 00:14:07 2012 +0200

    man: write man page for systemd-logind

diff --git a/Makefile.am b/Makefile.am
index 15f7a34..2e29a0f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2915,6 +2915,7 @@ nodist_udevrules_DATA += \
 	src/login/73-seat-late.rules
 
 MANPAGES += \
+	man/systemd-logind.service.8 \
 	man/logind.conf.5 \
 	man/sd-login.7 \
 	man/loginctl.1 \
@@ -2926,6 +2927,7 @@ MANPAGES += \
 	man/sd_get_seats.3
 
 MANPAGES_ALIAS += \
+	man/systemd-logind.8 \
 	man/sd_login_monitor_unref.3 \
 	man/sd_login_monitor_flush.3 \
 	man/sd_login_monitor_get_fd.3 \
@@ -2945,6 +2947,7 @@ MANPAGES_ALIAS += \
 	man/sd_get_sessions.3 \
 	man/sd_get_uids.3
 
+man/systemd-logind.8: man/systemd-logind.service.8
 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
diff --git a/man/loginctl.xml b/man/loginctl.xml
index 8e34a29..33a369e 100644
--- a/man/loginctl.xml
+++ b/man/loginctl.xml
@@ -59,7 +59,7 @@
                 <para><command>loginctl</command> may be used to
                 introspect and control the state of the
                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                login manager.</para>
+                login manager <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
         </refsect1>
 
         <refsect1>
@@ -458,6 +458,7 @@
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
         </refsect1>
diff --git a/man/logind.conf.xml b/man/logind.conf.xml
index 35a7d48..0d0c9b0 100644
--- a/man/logind.conf.xml
+++ b/man/logind.conf.xml
@@ -54,7 +54,7 @@
         <refsect1>
                 <title>Description</title>
 
-                <para>This files configures various parameters of the systemd login manager.</para>
+                <para>This files configures various parameters of the systemd login manager <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
 
         </refsect1>
 
@@ -234,6 +234,7 @@
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                   </para>
diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml
index d681276..f2c1ab8 100644
--- a/man/pam_systemd.xml
+++ b/man/pam_systemd.xml
@@ -44,7 +44,7 @@
 
         <refnamediv>
                 <refname>pam_systemd</refname>
-                <refpurpose>Register user sessions in the systemd control group hierarchy</refpurpose>
+                <refpurpose>Register user sessions in the systemd login manager</refpurpose>
         </refnamediv>
 
         <refsynopsisdiv>
@@ -57,8 +57,9 @@
                 <title>Description</title>
 
                 <para><command>pam_systemd</command> registers user
-                sessions in the systemd control group
-                hierarchy.</para>
+                sessions in the systemd login manager
+                <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                and hence the systemd control group hierarchy.</para>
 
                 <para>On login, this module ensures the following:</para>
 
@@ -304,12 +305,14 @@ session    required     pam_systemd.so kill-session-processes=1</programlisting>
         <refsect1>
                 <title>See Also</title>
                 <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
diff --git a/man/systemd-logind.service.xml b/man/systemd-logind.service.xml
new file mode 100644
index 0000000..dc9ee29
--- /dev/null
+++ b/man/systemd-logind.service.xml
@@ -0,0 +1,98 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//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/>.
+-->
+
+<refentry id="systemd-logind.service">
+
+        <refentryinfo>
+                <title>systemd-logind</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart at poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>systemd-logind</refentrytitle>
+                <manvolnum>8</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>systemd-logind.service</refname>
+                <refname>systemd-logind</refname>
+                <refpurpose>systemd Login Manager</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <para><filename>sysytemd-logind.service</filename></para>
+                <para><filename>/usr/lib/systemd/systemd-logind</filename></para>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><filename>systemd-logind</filename> is a system
+                service that manages user logins. It is responsible
+                for: keeping track of users and sessions, their
+                processes and their idle state; creating control
+                groups for user processes; provide PolicyKit-based
+                access for users to operations such as system shutdown
+                or sleep; implementing a shutdown/sleep inhibition
+                logic for applications; handling of power/sleep
+                hardware keys; multi-seat management; session switch
+                management; device access management for users;
+                automatic spawning of text logins (gettys) and user
+                runtime directory management.
+                </para>
+
+                <para>User sessions are registered in logind via the
+                <citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                PAM module.</para>
+
+                <para>See
+                <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                for information about the configuration of this
+                service.</para>
+
+                <para>See <ulink
+                url="http://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat
+                on Linux</ulink> for an introduction into basic
+                concepts of logind such as users, sessions and seats.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in
index d890713..0dd6e14 100644
--- a/units/systemd-logind.service.in
+++ b/units/systemd-logind.service.in
@@ -7,8 +7,8 @@
 
 [Unit]
 Description=Login Service
+Documentation=man:systemd-logind.service(7) man:logind.conf(5)
 Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat
-Documentation=man:logind.conf(5)
 After=nss-user-lookup.target
 
 [Service]



More information about the systemd-commits mailing list