ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
b9a53a
From a2e00522971897909db2a81b4daf10e5700f453e Mon Sep 17 00:00:00 2001
b9a53a
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
b9a53a
Date: Fri, 15 Mar 2019 10:13:55 +0100
b9a53a
Subject: [PATCH] man: reorder and add examples to systemd-analyze(1)
b9a53a
b9a53a
The number of verbs supported by systemd-analyze has grown quite a bit, and the
b9a53a
man page has become an unreadable wall of text. Let's put each verb in a
b9a53a
separate subsection, grouping similar verbs together, and add a lot of examples
b9a53a
to guide the user.
b9a53a
b9a53a
(cherry picked from commit d323a99001c1f7625e8ac902e18deb514a4ca18d)
b9a53a
b9a53a
Related: #1750343
b9a53a
---
b9a53a
 man/systemd-analyze.xml | 678 +++++++++++++++++++++++++---------------
b9a53a
 1 file changed, 429 insertions(+), 249 deletions(-)
b9a53a
b9a53a
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml
b9a53a
index f3b595880f..7c873cbdd1 100644
b9a53a
--- a/man/systemd-analyze.xml
b9a53a
+++ b/man/systemd-analyze.xml
b9a53a
@@ -41,46 +41,50 @@
b9a53a
       <arg choice="plain">critical-chain</arg>
b9a53a
       <arg choice="opt" rep="repeat"><replaceable>UNIT</replaceable></arg>
b9a53a
     </cmdsynopsis>
b9a53a
+
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">plot</arg>
b9a53a
-      <arg choice="opt">> file.svg</arg>
b9a53a
+      <arg choice="plain">log-level</arg>
b9a53a
+      <arg choice="opt"><replaceable>LEVEL</replaceable></arg>
b9a53a
     </cmdsynopsis>
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">dot</arg>
b9a53a
-      <arg choice="opt" rep="repeat"><replaceable>PATTERN</replaceable></arg>
b9a53a
-      <arg choice="opt">> file.dot</arg>
b9a53a
+      <arg choice="plain">log-target</arg>
b9a53a
+      <arg choice="opt"><replaceable>TARGET</replaceable></arg>
b9a53a
     </cmdsynopsis>
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">dump</arg>
b9a53a
+      <arg choice="plain">service-watchdogs</arg>
b9a53a
+      <arg choice="opt"><replaceable>BOOL</replaceable></arg>
b9a53a
     </cmdsynopsis>
b9a53a
+
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">cat-config</arg>
b9a53a
-      <arg choice="plain" rep="repeat"><replaceable>NAME</replaceable>|<replaceable>PATH</replaceable></arg>
b9a53a
+      <arg choice="plain">dump</arg>
b9a53a
     </cmdsynopsis>
b9a53a
+
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">unit-paths</arg>
b9a53a
+      <arg choice="plain">plot</arg>
b9a53a
+      <arg choice="opt">>file.svg</arg>
b9a53a
     </cmdsynopsis>
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">log-level</arg>
b9a53a
-      <arg choice="opt"><replaceable>LEVEL</replaceable></arg>
b9a53a
+      <arg choice="plain">dot</arg>
b9a53a
+      <arg choice="opt" rep="repeat"><replaceable>PATTERN</replaceable></arg>
b9a53a
+      <arg choice="opt">>file.dot</arg>
b9a53a
     </cmdsynopsis>
b9a53a
+
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">log-target</arg>
b9a53a
-      <arg choice="opt"><replaceable>TARGET</replaceable></arg>
b9a53a
+      <arg choice="plain">unit-paths</arg>
b9a53a
     </cmdsynopsis>
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
@@ -91,20 +95,20 @@
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">verify</arg>
b9a53a
-      <arg choice="opt" rep="repeat"><replaceable>FILES</replaceable></arg>
b9a53a
+      <arg choice="plain">calendar</arg>
b9a53a
+      <arg choice="plain" rep="repeat"><replaceable>SPECS</replaceable></arg>
b9a53a
     </cmdsynopsis>
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">calendar</arg>
b9a53a
-      <arg choice="plain" rep="repeat"><replaceable>SPECS</replaceable></arg>
b9a53a
+      <arg choice="plain">timespan</arg>
b9a53a
+      <arg choice="plain" rep="repeat"><replaceable>SPAN</replaceable></arg>
b9a53a
     </cmdsynopsis>
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
       <arg choice="opt" rep="repeat">OPTIONS</arg>
b9a53a
-      <arg choice="plain">service-watchdogs</arg>
b9a53a
-      <arg choice="opt"><replaceable>BOOL</replaceable></arg>
b9a53a
+      <arg choice="plain">cat-config</arg>
b9a53a
+      <arg choice="plain" rep="repeat"><replaceable>NAME</replaceable>|<replaceable>PATH</replaceable></arg>
b9a53a
     </cmdsynopsis>
b9a53a
     <cmdsynopsis>
b9a53a
       <command>systemd-analyze</command>
b9a53a
@@ -123,73 +127,299 @@
b9a53a
     verify the correctness of unit files. It is also used to access
b9a53a
     special functions useful for advanced system manager debugging.</para>
b9a53a
 
b9a53a
-    <para><command>systemd-analyze time</command> prints the time
b9a53a
-    spent in the kernel before userspace has been reached, the time
b9a53a
-    spent in the initial RAM disk (initrd) before normal system
b9a53a
-    userspace has been reached, and the time normal system userspace
b9a53a
-    took to initialize. Note that these measurements simply measure
b9a53a
-    the time passed up to the point where all system services have
b9a53a
-    been spawned, but not necessarily until they fully finished
b9a53a
-    initialization or the disk is idle.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze blame</command> prints a list of
b9a53a
-    all running units, ordered by the time they took to initialize.
b9a53a
-    This information may be used to optimize boot-up times. Note that
b9a53a
-    the output might be misleading as the initialization of one
b9a53a
-    service might be slow simply because it waits for the
b9a53a
-    initialization of another service to complete.
b9a53a
-    Also note: <command>systemd-analyze blame</command> doesn't display
b9a53a
-    results for services with <varname>Type=simple</varname>,
b9a53a
-    because systemd considers such services to be started immediately,
b9a53a
-    hence no measurement of the initialization delays can be done.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze critical-chain
b9a53a
-    [<replaceable>UNIT…</replaceable>]</command> prints a tree of
b9a53a
-    the time-critical chain of units (for each of the specified
b9a53a
-    <replaceable>UNIT</replaceable>s or for the default target
b9a53a
-    otherwise). The time after the unit is active or started is
b9a53a
-    printed after the "@" character. The time the unit takes to start
b9a53a
-    is printed after the "+" character. Note that the output might be
b9a53a
-    misleading as the initialization of one service might depend on
b9a53a
-    socket activation and because of the parallel execution of
b9a53a
-    units.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze plot</command> prints an SVG
b9a53a
-    graphic detailing which system services have been started at what
b9a53a
-    time, highlighting the time they spent on initialization.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze dot</command> generates textual
b9a53a
-    dependency graph description in dot format for further processing
b9a53a
-    with the GraphViz
b9a53a
-    <citerefentry project='die-net'><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
b9a53a
-    tool. Use a command line like <command>systemd-analyze dot | dot
b9a53a
-    -Tsvg > systemd.svg</command> to generate a graphical dependency
b9a53a
-    tree. Unless <option>--order</option> or
b9a53a
-    <option>--require</option> is passed, the generated graph will
b9a53a
-    show both ordering and requirement dependencies. Optional pattern
b9a53a
-    globbing style specifications (e.g. <filename>*.target</filename>)
b9a53a
-    may be given at the end. A unit dependency is included in the
b9a53a
-    graph if any of these patterns match either the origin or
b9a53a
-    destination node.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze dump</command> outputs a (usually
b9a53a
-    very long) human-readable serialization of the complete server
b9a53a
-    state. Its format is subject to change without notice and should
b9a53a
-    not be parsed by applications.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze cat-config</command> is similar
b9a53a
-    to <command>systemctl cat</command>, but operates on config files.
b9a53a
-    It will copy the contents of a config file and any drop-ins to standard
b9a53a
-    output, using the usual systemd set of directories and rules for
b9a53a
-    precedence. Each argument must be either an absolute path including
b9a53a
-    the prefix (such as <filename>/etc/systemd/logind.conf</filename> or
b9a53a
-    <filename>/usr/lib/systemd/logind.conf</filename>), or a name
b9a53a
-    relative to the prefix (such as <filename>systemd/logind.conf</filename>).
b9a53a
-    </para>
b9a53a
+    <para>If no command is passed, <command>systemd-analyze
b9a53a
+    time</command> is implied.</para>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze time</command></title>
b9a53a
+
b9a53a
+      <para>This command prints the time spent in the kernel before userspace has been reached, the time
b9a53a
+      spent in the initial RAM disk (initrd) before normal system userspace has been reached, and the time
b9a53a
+      normal system userspace took to initialize. Note that these measurements simply measure the time passed
b9a53a
+      up to the point where all system services have been spawned, but not necessarily until they fully
b9a53a
+      finished initialization or the disk is idle.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title><command>Show how long the boot took</command></title>
b9a53a
+
b9a53a
+        <programlisting># in a container
b9a53a
+$ systemd-analyze time
b9a53a
+Startup finished in 296ms (userspace)
b9a53a
+multi-user.target reached after 275ms in userspace
b9a53a
+
b9a53a
+# on a real machine
b9a53a
+$ systemd-analyze time
b9a53a
+Startup finished in 2.584s (kernel) + 19.176s (initrd) + 47.847s (userspace) = 1min 9.608s
b9a53a
+multi-user.target reached after 47.820s in userspace
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze blame</command></title>
b9a53a
+
b9a53a
+      <para>This command prints a list of all running units, ordered by the time they took to initialize.
b9a53a
+      This information may be used to optimize boot-up times. Note that the output might be misleading as the
b9a53a
+      initialization of one service might be slow simply because it waits for the initialization of another
b9a53a
+      service to complete.  Also note: <command>systemd-analyze blame</command> doesn't display results for
b9a53a
+      services with <varname>Type=simple</varname>, because systemd considers such services to be started
b9a53a
+      immediately, hence no measurement of the initialization delays can be done.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title><command>Show which units took the most time during boot</command></title>
b9a53a
+
b9a53a
+        <programlisting>$ systemd-analyze blame
b9a53a
+         32.875s pmlogger.service
b9a53a
+         20.905s systemd-networkd-wait-online.service
b9a53a
+         13.299s dev-vda1.device
b9a53a
+         ...
b9a53a
+            23ms sysroot.mount
b9a53a
+            11ms initrd-udevadm-cleanup-db.service
b9a53a
+             3ms sys-kernel-config.mount
b9a53a
+        </programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze critical-chain <optional><replaceable>UNIT</replaceable>...</optional></command></title>
b9a53a
+
b9a53a
+      <para>This command prints a tree of the time-critical chain of units (for each of the specified
b9a53a
+      <replaceable>UNIT</replaceable>s or for the default target otherwise). The time after the unit is
b9a53a
+      active or started is printed after the "@" character. The time the unit takes to start is printed after
b9a53a
+      the "+" character. Note that the output might be misleading as the initialization of services might
b9a53a
+      depend on socket activation and because of the parallel execution of units.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title><command>systemd-analyze time</command></title>
b9a53a
+
b9a53a
+      <programlisting>$ systemd-analyze critical-chain
b9a53a
+multi-user.target @47.820s
b9a53a
+└─pmie.service @35.968s +548ms
b9a53a
+  └─pmcd.service @33.715s +2.247s
b9a53a
+    └─network-online.target @33.712s
b9a53a
+      └─systemd-networkd-wait-online.service @12.804s +20.905s
b9a53a
+        └─systemd-networkd.service @11.109s +1.690s
b9a53a
+          └─systemd-udevd.service @9.201s +1.904s
b9a53a
+            └─systemd-tmpfiles-setup-dev.service @7.306s +1.776s
b9a53a
+              └─kmod-static-nodes.service @6.976s +177ms
b9a53a
+                └─systemd-journald.socket
b9a53a
+                  └─system.slice
b9a53a
+                    └─-.slice
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze log-level [<replaceable>LEVEL</replaceable>]</command></title>
b9a53a
+
b9a53a
+      <para><command>systemd-analyze log-level</command> prints the current log level of the
b9a53a
+      <command>systemd</command> daemon.  If an optional argument <replaceable>LEVEL</replaceable> is
b9a53a
+      provided, then the command changes the current log level of the <command>systemd</command> daemon to
b9a53a
+      <replaceable>LEVEL</replaceable> (accepts the same values as <option>--log-level=</option> described in
b9a53a
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze log-target [<replaceable>TARGET</replaceable>]</command></title>
b9a53a
+
b9a53a
+      <para><command>systemd-analyze log-target</command> prints the current log target of the
b9a53a
+      <command>systemd</command> daemon.  If an optional argument <replaceable>TARGET</replaceable> is
b9a53a
+      provided, then the command changes the current log target of the <command>systemd</command> daemon to
b9a53a
+      <replaceable>TARGET</replaceable> (accepts the same values as <option>--log-target=</option>, described
b9a53a
+      in <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze service-watchdogs [yes|no]</command></title>
b9a53a
+
b9a53a
+      <para><command>systemd-analyze service-watchdogs</command> prints the current state of service runtime
b9a53a
+      watchdogs of the <command>systemd</command> daemon. If an optional boolean argument is provided, then
b9a53a
+      globally enables or disables the service runtime watchdogs (<option>WatchdogSec=</option>) and
b9a53a
+      emergency actions (e.g.  <option>OnFailure=</option> or <option>StartLimitAction=</option>); see
b9a53a
+      <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
b9a53a
+      The hardware watchdog is not affected by this setting.</para>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze dump</command></title>
b9a53a
+
b9a53a
+      <para>This command outputs a (usually very long) human-readable serialization of the complete server
b9a53a
+      state. Its format is subject to change without notice and should not be parsed by applications.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title>Show the internal state of user manager</title>
b9a53a
+
b9a53a
+        <programlisting>$ systemd-analyze --user dump
b9a53a
+Timestamp userspace: Thu 2019-03-14 23:28:07 CET
b9a53a
+Timestamp finish: Thu 2019-03-14 23:28:07 CET
b9a53a
+Timestamp generators-start: Thu 2019-03-14 23:28:07 CET
b9a53a
+Timestamp generators-finish: Thu 2019-03-14 23:28:07 CET
b9a53a
+Timestamp units-load-start: Thu 2019-03-14 23:28:07 CET
b9a53a
+Timestamp units-load-finish: Thu 2019-03-14 23:28:07 CET
b9a53a
+-> Unit proc-timer_list.mount:
b9a53a
+        Description: /proc/timer_list
b9a53a
+        ...
b9a53a
+-> Unit default.target:
b9a53a
+        Description: Main user target
b9a53a
+...
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze plot</command></title>
b9a53a
+
b9a53a
+      <para>This command prints an SVG graphic detailing which system services have been started at what
b9a53a
+      time, highlighting the time they spent on initialization.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title><command>Plot a bootchart</command></title>
b9a53a
+
b9a53a
+        <programlisting>$ systemd-analyze plot >bootup.svg
b9a53a
+$ eog bootup.svg&
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze dot [<replaceable>pattern</replaceable>...]</command></title>
b9a53a
+
b9a53a
+      <para>This command generates textual dependency graph description in dot format for further processing
b9a53a
+      with the GraphViz
b9a53a
+      <citerefentry project='die-net'><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
b9a53a
+      tool. Use a command line like <command>systemd-analyze dot | dot -Tsvg >systemd.svg</command> to
b9a53a
+      generate a graphical dependency tree. Unless <option>--order</option> or <option>--require</option> is
b9a53a
+      passed, the generated graph will show both ordering and requirement dependencies. Optional pattern
b9a53a
+      globbing style specifications (e.g. <filename>*.target</filename>) may be given at the end. A unit
b9a53a
+      dependency is included in the graph if any of these patterns match either the origin or destination
b9a53a
+      node.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title>Plot all dependencies of any unit whose name starts with <literal>avahi-daemon</literal>
b9a53a
+        </title>
b9a53a
+
b9a53a
+        <programlisting>$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg >avahi.svg
b9a53a
+$ eog avahi.svg</programlisting>
b9a53a
+      </example>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title>Plot the dependencies between all known target units</title>
b9a53a
 
b9a53a
-    <example>
b9a53a
-      <title>Showing logind configuration</title>
b9a53a
-      <programlisting>$ systemd-analyze cat-config systemd/logind.conf
b9a53a
+        <programlisting>$ systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' \
b9a53a
+      | dot -Tsvg >targets.svg
b9a53a
+$ eog targets.svg</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze unit-paths</command></title>
b9a53a
+
b9a53a
+      <para>This command outputs a list of all directories from which unit files, <filename>.d</filename>
b9a53a
+      overrides, and <filename>.wants</filename>, <filename>.requires</filename> symlinks may be
b9a53a
+      loaded. Combine with <option>--user</option> to retrieve the list for the user manager instance, and
b9a53a
+      <option>--global</option> for the global configuration of user manager instances.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title><command>Show all paths for generated units</command></title>
b9a53a
+
b9a53a
+        <programlisting>$ systemd-analyze unit-paths | grep '^/run'
b9a53a
+/run/systemd/system.control
b9a53a
+/run/systemd/transient
b9a53a
+/run/systemd/generator.early
b9a53a
+/run/systemd/system
b9a53a
+/run/systemd/system.attached
b9a53a
+/run/systemd/generator
b9a53a
+/run/systemd/generator.late
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+
b9a53a
+      <para>Note that this verb prints the list that is compiled into <command>systemd-analyze</command>
b9a53a
+      itself, and does not comunicate with the running manager. Use
b9a53a
+      <programlisting>systemctl [--user] [--global] show -p UnitPath --value</programlisting>
b9a53a
+      to retrieve the actual list that the manager uses, with any empty directories omitted.</para>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze syscall-filter <optional><replaceable>SET</replaceable>...</optional></command></title>
b9a53a
+
b9a53a
+      <para>This command will list system calls contained in the specified system call set
b9a53a
+      <replaceable>SET</replaceable>, or all known sets if no sets are specified. Argument
b9a53a
+      <replaceable>SET</replaceable> must include the <literal>@</literal> prefix.</para>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze calendar <replaceable>EXPRESSION</replaceable>...</command></title>
b9a53a
+
b9a53a
+      <para>This command will parse and normalize repetitive calendar time events, and will calculate when
b9a53a
+      they elapse next. This takes the same input as the <varname>OnCalendar=</varname> setting in
b9a53a
+      <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
b9a53a
+      following the syntax described in
b9a53a
+      <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>. By
b9a53a
+      default, only the next time the calendar expression will elapse is shown; use
b9a53a
+      <option>--iterations=</option> to show the specified number of next times the expression
b9a53a
+      elapses.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title>Show leap days in the near future</title>
b9a53a
+
b9a53a
+        <programlisting>$ systemd-analyze calendar --iterations=5 '*-2-29 0:0:0'
b9a53a
+  Original form: *-2-29 0:0:0
b9a53a
+Normalized form: *-02-29 00:00:00
b9a53a
+    Next elapse: Sat 2020-02-29 00:00:00 UTC
b9a53a
+       From now: 11 months 15 days left
b9a53a
+       Iter. #2: Thu 2024-02-29 00:00:00 UTC
b9a53a
+       From now: 4 years 11 months left
b9a53a
+       Iter. #3: Tue 2028-02-29 00:00:00 UTC
b9a53a
+       From now: 8 years 11 months left
b9a53a
+       Iter. #4: Sun 2032-02-29 00:00:00 UTC
b9a53a
+       From now: 12 years 11 months left
b9a53a
+       Iter. #5: Fri 2036-02-29 00:00:00 UTC
b9a53a
+       From now: 16 years 11 months left
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze timespan <replaceable>EXPRESSION</replaceable>...</command></title>
b9a53a
+
b9a53a
+      <para>This command parses a time span and outputs the normalized form and the equivalent value in
b9a53a
+      microseconds. The time span should adhere to the same syntax documented in
b9a53a
+      <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
b9a53a
+      Values without associated magnitudes are parsed as seconds.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title>Show parsing of timespans</title>
b9a53a
+
b9a53a
+        <programlisting>$ systemd-analyze timespan 1s 300s '1year 0.000001s'
b9a53a
+Original: 1s
b9a53a
+      μs: 1000000
b9a53a
+   Human: 1s
b9a53a
+
b9a53a
+Original: 300s
b9a53a
+      μs: 300000000
b9a53a
+   Human: 5min
b9a53a
+
b9a53a
+Original: 1year 0.000001s
b9a53a
+      μs: 31557600000001
b9a53a
+   Human: 1y 1us
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze cat-config</command>
b9a53a
+      <replaceable>NAME</replaceable>|<replaceable>PATH</replaceable>...</title>
b9a53a
+
b9a53a
+      <para>This command is similar to <command>systemctl cat</command>, but operates on config files. It
b9a53a
+      will copy the contents of a config file and any drop-ins to standard output, using the usual systemd
b9a53a
+      set of directories and rules for precedence. Each argument must be either an absolute path including
b9a53a
+      the prefix (such as <filename>/etc/systemd/logind.conf</filename> or
b9a53a
+      <filename>/usr/lib/systemd/logind.conf</filename>), or a name relative to the prefix (such as
b9a53a
+      <filename>systemd/logind.conf</filename>).</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title>Showing logind configuration</title>
b9a53a
+        <programlisting>$ systemd-analyze cat-config systemd/logind.conf
b9a53a
 # /etc/systemd/logind.conf
b9a53a
 ...
b9a53a
 [Login]
b9a53a
@@ -201,90 +431,122 @@ NAutoVTs=8
b9a53a
 
b9a53a
 # /etc/systemd/logind.conf.d/50-override.conf
b9a53a
 ... some administrator override
b9a53a
-      </programlisting>
b9a53a
-    </example>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze unit-paths</command> outputs a list of all
b9a53a
-    directories from which unit files, <filename>.d</filename> overrides, and
b9a53a
-    <filename>.wants</filename>, <filename>.requires</filename> symlinks may be
b9a53a
-    loaded. Combine with <option>--user</option> to retrieve the list for the user
b9a53a
-    manager instance, and <option>--global</option> for the global configuration of
b9a53a
-    user manager instances. Note that this verb prints the list that is compiled into
b9a53a
-    <command>systemd-analyze</command> itself, and does not comunicate with the
b9a53a
-    running manager. Use
b9a53a
-    <programlisting>systemctl [--user] [--global] show -p UnitPath --value</programlisting>
b9a53a
-    to retrieve the actual list that the manager uses, with any empty directories
b9a53a
-    omitted.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze log-level</command>
b9a53a
-    prints the current log level of the <command>systemd</command> daemon.
b9a53a
-    If an optional argument <replaceable>LEVEL</replaceable> is provided, then the command changes the current log
b9a53a
-    level of the <command>systemd</command> daemon to <replaceable>LEVEL</replaceable> (accepts the same values as
b9a53a
-    <option>--log-level=</option> described in
b9a53a
-    <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze log-target</command>
b9a53a
-    prints the current log target of the <command>systemd</command> daemon.
b9a53a
-    If an optional argument <replaceable>TARGET</replaceable> is provided, then the command changes the current log
b9a53a
-    target of the <command>systemd</command> daemon to <replaceable>TARGET</replaceable> (accepts the same values as
b9a53a
-    <option>--log-target=</option>, described in
b9a53a
-    <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze syscall-filter <optional><replaceable>SET</replaceable>…</optional></command>
b9a53a
-    will list system calls contained in the specified system call set <replaceable>SET</replaceable>,
b9a53a
-    or all known sets if no sets are specified. Argument <replaceable>SET</replaceable> must include
b9a53a
-    the <literal>@</literal> prefix.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze verify</command> will load unit files and print
b9a53a
-    warnings if any errors are detected. Files specified on the command line will be
b9a53a
-    loaded, but also any other units referenced by them. The full unit search path is
b9a53a
-    formed by combining the directories for all command line arguments, and the usual unit
b9a53a
-    load paths (variable <varname>$SYSTEMD_UNIT_PATH</varname> is supported, and may be
b9a53a
-    used to replace or augment the compiled in set of unit load paths; see
b9a53a
-    <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
b9a53a
-    All units files present in the directories containing the command line arguments will
b9a53a
-    be used in preference to the other paths.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze calendar</command> will parse and normalize repetitive calendar time events, and
b9a53a
-    will calculate when they will elapse next. This takes the same input as the <varname>OnCalendar=</varname> setting
b9a53a
-    in <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>, following the
b9a53a
-    syntax described in
b9a53a
-    <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze service-watchdogs</command>
b9a53a
-    prints the current state of service runtime watchdogs of the <command>systemd</command> daemon.
b9a53a
-    If an optional boolean argument is provided, then globally enables or disables the service
b9a53a
-    runtime watchdogs (<option>WatchdogSec=</option>) and emergency actions (e.g.
b9a53a
-    <option>OnFailure=</option> or <option>StartLimitAction=</option>); see
b9a53a
-    <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
b9a53a
-    The hardware watchdog is not affected by this setting.</para>
b9a53a
-
b9a53a
-    <para><command>systemd-analyze security</command> analyzes the security and sandboxing settings of one or more
b9a53a
-    specified service units. If at least one unit name is specified the security settings of the specified service
b9a53a
-    units are inspected and a detailed analysis is shown. If no unit name is specified, all currently loaded,
b9a53a
-    long-running service units are inspected and a terse table with results shown. The command checks for various
b9a53a
-    security-related service settings, assigning each a numeric "exposure level" value, depending on how important a
b9a53a
-    setting is. It then calculates an overall exposure level for the whole unit, which is an estimation in the range
b9a53a
-    0.0…10.0 indicating how exposed a service is security-wise. High exposure levels indicate very little applied
b9a53a
-    sandboxing. Low exposure levels indicate tight sandboxing and strongest security restrictions. Note that this only
b9a53a
-    analyzes the per-service security features systemd itself implements. This means that any additional security
b9a53a
-    mechanisms applied by the service code itself are not accounted for. The exposure level determined this way should
b9a53a
-    not be misunderstood: a high exposure level neither means that there is no effective sandboxing applied by the
b9a53a
-    service code itself, nor that the service is actually vulnerable to remote or local attacks. High exposure levels
b9a53a
-    do indicate however that most likely the service might benefit from additional settings applied to them. Please
b9a53a
-    note that many of the security and sandboxing settings individually can be circumvented — unless combined with
b9a53a
-    others. For example, if a service retains the privilege to establish or undo mount points many of the sandboxing
b9a53a
-    options can be undone by the service code itself. Due to that is essential that each service uses the most
b9a53a
-    comprehensive and strict sandboxing and security settings possible. The tool will take into account some of these
b9a53a
-    combinations and relationships between the settings, but not all. Also note that the security and sandboxing
b9a53a
-    settings analyzed here only apply to the operations executed by the service code itself. If a service has access to
b9a53a
-    an IPC system (such as D-Bus) it might request operations from other services that are not subject to the same
b9a53a
-    restrictions. Any comprehensive security and sandboxing analysis is hence incomplete if the IPC access policy is
b9a53a
-    not validated too.</para>
b9a53a
+        </programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
 
b9a53a
-    <para>If no command is passed, <command>systemd-analyze
b9a53a
-    time</command> is implied.</para>
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze verify <replaceable>FILE</replaceable>...</command></title>
b9a53a
+
b9a53a
+      <para>This command will load unit files and print warnings if any errors are detected. Files specified
b9a53a
+      on the command line will be loaded, but also any other units referenced by them. The full unit search
b9a53a
+      path is formed by combining the directories for all command line arguments, and the usual unit load
b9a53a
+      paths (variable <varname>$SYSTEMD_UNIT_PATH</varname> is supported, and may be used to replace or
b9a53a
+      augment the compiled in set of unit load paths; see
b9a53a
+      <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).  All
b9a53a
+      units files present in the directories containing the command line arguments will be used in preference
b9a53a
+      to the other paths.</para>
b9a53a
+
b9a53a
+      <para>The following errors are currently detected:</para>
b9a53a
+      <itemizedlist>
b9a53a
+        <listitem><para>unknown sections and directives,</para></listitem>
b9a53a
+
b9a53a
+        <listitem><para>missing dependencies which are required to start the given unit,</para></listitem>
b9a53a
+
b9a53a
+        <listitem><para>man pages listed in <varname>Documentation=</varname> which are not found in the
b9a53a
+        system,</para></listitem>
b9a53a
+
b9a53a
+        <listitem><para>commands listed in <varname>ExecStart=</varname> and similar which are not found in
b9a53a
+        the system or not executable.</para></listitem>
b9a53a
+      </itemizedlist>
b9a53a
 
b9a53a
+      <example>
b9a53a
+        <title>Misspelt directives</title>
b9a53a
+
b9a53a
+        <programlisting>$ cat ./user.slice
b9a53a
+[Unit]
b9a53a
+WhatIsThis=11
b9a53a
+Documentation=man:nosuchfile(1)
b9a53a
+Requires=different.service
b9a53a
+
b9a53a
+[Service]
b9a53a
+Description=x
b9a53a
+
b9a53a
+$ systemd-analyze verify ./user.slice
b9a53a
+[./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
b9a53a
+[./user.slice:13] Unknown section 'Service'. Ignoring.
b9a53a
+Error: org.freedesktop.systemd1.LoadFailed:
b9a53a
+   Unit different.service failed to load:
b9a53a
+   No such file or directory.
b9a53a
+Failed to create user.slice/start: Invalid argument
b9a53a
+user.slice: man nosuchfile(1) command failed with code 16
b9a53a
+        </programlisting>
b9a53a
+      </example>
b9a53a
+
b9a53a
+      <example>
b9a53a
+        <title>Missing service units</title>
b9a53a
+
b9a53a
+        <programlisting>$ tail ./a.socket ./b.socket
b9a53a
+==> ./a.socket <==
b9a53a
+[Socket]
b9a53a
+ListenStream=100
b9a53a
+
b9a53a
+==> ./b.socket <==
b9a53a
+[Socket]
b9a53a
+ListenStream=100
b9a53a
+Accept=yes
b9a53a
+
b9a53a
+$ systemd-analyze verify ./a.socket ./b.socket
b9a53a
+Service a.service not loaded, a.socket cannot be started.
b9a53a
+Service b@0.service not loaded, b.socket cannot be started.
b9a53a
+        </programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
+
b9a53a
+    <refsect2>
b9a53a
+      <title><command>systemd-analyze security <optional><replaceable>UNIT</replaceable>...</optional></command></title>
b9a53a
+
b9a53a
+      <para>This command analyzes the security and sandboxing settings of one or more specified service
b9a53a
+      units. If at least one unit name is specified the security settings of the specified service units are
b9a53a
+      inspected and a detailed analysis is shown. If no unit name is specified, all currently loaded,
b9a53a
+      long-running service units are inspected and a terse table with results shown. The command checks for
b9a53a
+      various security-related service settings, assigning each a numeric "exposure level" value, depending
b9a53a
+      on how important a setting is. It then calculates an overall exposure level for the whole unit, which
b9a53a
+      is an estimation in the range 0.0…10.0 indicating how exposed a service is security-wise. High exposure
b9a53a
+      levels indicate very little applied sandboxing. Low exposure levels indicate tight sandboxing and
b9a53a
+      strongest security restrictions. Note that this only analyzes the per-service security features systemd
b9a53a
+      itself implements. This means that any additional security mechanisms applied by the service code
b9a53a
+      itself are not accounted for. The exposure level determined this way should not be misunderstood: a
b9a53a
+      high exposure level neither means that there is no effective sandboxing applied by the service code
b9a53a
+      itself, nor that the service is actually vulnerable to remote or local attacks. High exposure levels do
b9a53a
+      indicate however that most likely the service might benefit from additional settings applied to
b9a53a
+      them.</para>
b9a53a
+
b9a53a
+      <para>Please note that many of the security and sandboxing settings individually can be circumvented —
b9a53a
+      unless combined with others. For example, if a service retains the privilege to establish or undo mount
b9a53a
+      points many of the sandboxing options can be undone by the service code itself. Due to that is
b9a53a
+      essential that each service uses the most comprehensive and strict sandboxing and security settings
b9a53a
+      possible. The tool will take into account some of these combinations and relationships between the
b9a53a
+      settings, but not all. Also note that the security and sandboxing settings analyzed here only apply to
b9a53a
+      the operations executed by the service code itself. If a service has access to an IPC system (such as
b9a53a
+      D-Bus) it might request operations from other services that are not subject to the same
b9a53a
+      restrictions. Any comprehensive security and sandboxing analysis is hence incomplete if the IPC access
b9a53a
+      policy is not validated too.</para>
b9a53a
+
b9a53a
+      <example>
b9a53a
+      <title>Analyze <filename noindex="true">systemd-logind.service</filename></title>
b9a53a
+
b9a53a
+      <programlisting>$ systemd-analyze security --no-pager systemd-logind.service
b9a53a
+  NAME                DESCRIPTION                              EXPOSURE
b9a53a
+✗ PrivateNetwork=     Service has access to the host's network      0.5
b9a53a
+✗ User=/DynamicUser=  Service runs as root user                     0.4
b9a53a
+✗ DeviceAllow=        Service has no device ACL                     0.2
b9a53a
+✓ IPAddressDeny=      Service blocks all IP address ranges
b9a53a
+...
b9a53a
+→ Overall exposure level for systemd-logind.service: 4.1 OK 🙂
b9a53a
+</programlisting>
b9a53a
+      </example>
b9a53a
+    </refsect2>
b9a53a
   </refsect1>
b9a53a
 
b9a53a
   <refsect1>
b9a53a
@@ -408,88 +670,6 @@ NAutoVTs=8
b9a53a
     otherwise.</para>
b9a53a
   </refsect1>
b9a53a
 
b9a53a
-  <refsect1>
b9a53a
-    <title>Examples for <command>dot</command></title>
b9a53a
-
b9a53a
-    <example>
b9a53a
-      <title>Plots all dependencies of any unit whose name starts with
b9a53a
-      <literal>avahi-daemon</literal></title>
b9a53a
-
b9a53a
-      <programlisting>$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg > avahi.svg
b9a53a
-$ eog avahi.svg</programlisting>
b9a53a
-    </example>
b9a53a
-
b9a53a
-    <example>
b9a53a
-      <title>Plots the dependencies between all known target units</title>
b9a53a
-
b9a53a
-      <programlisting>$ systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg > targets.svg
b9a53a
-$ eog targets.svg</programlisting>
b9a53a
-    </example>
b9a53a
-  </refsect1>
b9a53a
-
b9a53a
-  <refsect1>
b9a53a
-    <title>Examples for <command>verify</command></title>
b9a53a
-
b9a53a
-    <para>The following errors are currently detected:</para>
b9a53a
-    <itemizedlist>
b9a53a
-      <listitem><para>unknown sections and directives,
b9a53a
-      </para></listitem>
b9a53a
-
b9a53a
-      <listitem><para>missing dependencies which are required to start
b9a53a
-      the given unit,</para></listitem>
b9a53a
-
b9a53a
-      <listitem><para>man pages listed in
b9a53a
-      <varname>Documentation=</varname> which are not found in the
b9a53a
-      system,</para></listitem>
b9a53a
-
b9a53a
-      <listitem><para>commands listed in <varname>ExecStart=</varname>
b9a53a
-      and similar which are not found in the system or not
b9a53a
-      executable.</para></listitem>
b9a53a
-    </itemizedlist>
b9a53a
-
b9a53a
-    <example>
b9a53a
-      <title>Misspelt directives</title>
b9a53a
-
b9a53a
-      <programlisting>$ cat ./user.slice
b9a53a
-[Unit]
b9a53a
-WhatIsThis=11
b9a53a
-Documentation=man:nosuchfile(1)
b9a53a
-Requires=different.service
b9a53a
-
b9a53a
-[Service]
b9a53a
-Description=x
b9a53a
-
b9a53a
-$ systemd-analyze verify ./user.slice
b9a53a
-[./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
b9a53a
-[./user.slice:13] Unknown section 'Service'. Ignoring.
b9a53a
-Error: org.freedesktop.systemd1.LoadFailed:
b9a53a
-   Unit different.service failed to load:
b9a53a
-   No such file or directory.
b9a53a
-Failed to create user.slice/start: Invalid argument
b9a53a
-user.slice: man nosuchfile(1) command failed with code 16
b9a53a
-      </programlisting>
b9a53a
-    </example>
b9a53a
-
b9a53a
-    <example>
b9a53a
-      <title>Missing service units</title>
b9a53a
-
b9a53a
-      <programlisting>$ tail ./a.socket ./b.socket
b9a53a
-==> ./a.socket <==
b9a53a
-[Socket]
b9a53a
-ListenStream=100
b9a53a
-
b9a53a
-==> ./b.socket <==
b9a53a
-[Socket]
b9a53a
-ListenStream=100
b9a53a
-Accept=yes
b9a53a
-
b9a53a
-$ systemd-analyze verify ./a.socket ./b.socket
b9a53a
-Service a.service not loaded, a.socket cannot be started.
b9a53a
-Service b@0.service not loaded, b.socket cannot be started.
b9a53a
-      </programlisting>
b9a53a
-    </example>
b9a53a
-  </refsect1>
b9a53a
-
b9a53a
   <xi:include href="less-variables.xml" />
b9a53a
 
b9a53a
   <refsect1>