diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-04-26 13:49:50 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-04-27 10:06:24 +0200 |
commit | 854a42fb2e9db1b9eaa381559d7671f2e9b3a0f1 (patch) | |
tree | bb64ddf3db3d11a700eb05a7f11ec040322c185c /man | |
parent | 81f5e5136859523782e0ca0260eee60dc175c777 (diff) | |
download | systemd-854a42fb2e9db1b9eaa381559d7671f2e9b3a0f1.tar.gz systemd-854a42fb2e9db1b9eaa381559d7671f2e9b3a0f1.tar.bz2 systemd-854a42fb2e9db1b9eaa381559d7671f2e9b3a0f1.zip |
analyze: add 'cat-config' verb
This is used as 'systemd-analyze show-config systemd/logind.conf', which
will dump
/etc/systemd/system/user@.service
/etc/systemd/system/user@.service.d/*.conf
/run/systemd/system/user@.service.d/*.conf
/usr/local/lib/systemd/system/user@.service.d/*.conf
/usr/lib/systemd/system/user@.service.d/*.conf
The idea is to make it easy to dump the configuration using the same locations
and order that systemd programs use themselves (including masking, in the right
order, etc.). This is the generic variant that works with any configuration
scheme that follows the same general rules:
$ systemd-analyze cat-config systemd/system.conf
$ systemd-analyze cat-config systemd/user.conf
$ systemd-analyze cat-config systemd/logind.conf
$ systemd-analyze cat-config systemd/sleep.conf
$ systemd-analyze cat-config systemd/journald.conf
$ systemd-analyze cat-config systemd/journal-remote.conf
$ systemd-analyze cat-config systemd/journal-upload.conf
$ systemd-analyze cat-config systemd/coredump.conf
$ systemd-analyze cat-config systemd/resolved.conf
$ systemd-analyze cat-config systemd/timesyncd.conf
$ systemd-analyze cat-config udev/udev.conf
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd-analyze.xml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml index de14a7e3ce..70f87f4786 100644 --- a/man/systemd-analyze.xml +++ b/man/systemd-analyze.xml @@ -81,6 +81,12 @@ <cmdsynopsis> <command>systemd-analyze</command> <arg choice="opt" rep="repeat">OPTIONS</arg> + <arg choice="plain">cat-config</arg> + <arg choice="plain" rep="repeat"><replaceable>NAME</replaceable></arg> + </cmdsynopsis> + <cmdsynopsis> + <command>systemd-analyze</command> + <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="plain">unit-paths</arg> </cmdsynopsis> <cmdsynopsis> @@ -180,6 +186,30 @@ state. Its format is subject to change without notice and should not be parsed by applications.</para> + <para><command>systemd-analyze cat-config</command> is similar + to <command>systemctl cat</command>, but operates on config files. + It will copy the contents of a config file and any drop-ins to standard + output, using the usual systemd set of directories and rules for + precedence.</para> + + <example> + <title>Showing logind configuration</title> + <programlisting>$ systemd-analyze cat-config systemd/logind.conf +# /etc/systemd/logind.conf +# This file is part of systemd. +... +[Login] +NAutoVTs=8 +... + +# /usr/lib/systemd/logind.conf.d/20-test.conf +... some override from another package + +# /etc/systemd/logind.conf.d/50-override.conf +... some adminstrator override + </programlisting> + </example> + <para><command>systemd-analyze unit-paths</command> outputs a list of all directories from which unit files, <filename>.d</filename> overrides, and <filename>.wants</filename>, <filename>.requires</filename> symlinks may be |