HALF ECHO LEARN / REFERENCE COLLECTION
v262.2man/systemd-analyze.xml
Git blob: a7f438343f66a8f284bb620e1f853f5715791ea1
Lines 1001–2000 of 2,002
swap encrypted - -
root-verity ignore - -
usr-verity unprotected yes -
root-verity-sig ignore - -
usr-verity-sig ignore - -
tmp ignore - -
var ignore - -
default ignore - -</programlisting>
</example>
</refsect2>
<refsect2>
<title><command>systemd-analyze has-tpm2</command></title>
<para>Reports whether the system is equipped with a usable TPM2 device. If a TPM2 device has been
discovered, is supported, and is being used by firmware, by the OS kernel drivers and by userspace
(i.e. systemd) this prints <literal>yes</literal> and exits with exit status zero. If no such device is
discovered/supported/used, prints <literal>no</literal>. Otherwise, prints
<literal>partial</literal>. In either of these two cases exits with non-zero exit status. It also shows
five lines indicating separately whether firmware, drivers, the system, the kernel and libraries
discovered/support/use TPM2. Currently, required libraries are <filename>libtss2-esys.so.0</filename>,
<filename>libtss2-rc.so.0</filename>, and <filename>libtss2-mu.so.0</filename>. The requirement may be
changed in the future release.</para>
<para>Note, this checks for TPM 2.0 devices only, and does not consider TPM 1.2 at all.</para>
<para>Combine with <option>--quiet</option> to suppress the output.</para>
<example>
<title>Example Output</title>
<programlisting>yes
+firmware
+driver
+system
+subsystem
+libraries
+libtss2-esys.so.0
+libtss2-rc.so.0
+libtss2-mu.so.0</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v257"/>
</refsect2>
<refsect2>
<title><command>systemd-analyze identify-tpm2</command></title>
<para>Shows vendor information about the TPM 2.0 device discovered.</para>
<example>
<title>Example Output</title>
<programlisting> Family Indicator: 2.0
Level: 0
Revision: 1.59
Specification Date: Mon 2023-01-09
Manufacturer: STM
Vendor String: ST33KTPM2XSPI
Firmware Version: 9.258
Modalias String: fi2.0:lv0:rv1.59:sy2023:sd9:mfSTM:vsST33KTPM2XSPI:ty0:fw9.258.0:</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v260"/>
</refsect2>
<refsect2>
<title><command>systemd-analyze pcrs <optional><replaceable>PCR</replaceable>…</optional></command></title>
<para>This command shows the known TPM2 PCRs along with their identifying names and current values.</para>
<example>
<title>Example Output</title>
<programlisting>$ systemd-analyze pcrs
NR NAME SHA256
0 platform-code bcd2eb527108bbb1f5528409bcbe310aa9b74f687854cc5857605993f3d9eb11
1 platform-config b60622856eb7ce52637b80f30a520e6e87c347daa679f3335f4f1a600681bb01
2 external-code 1471262403e9a62f9c392941300b4807fbdb6f0bfdd50abfab752732087017dd
3 external-config 3d458cfe55cc03ea1f443f1562beec8df51c75e14a9fcf9a7234a13f198e7969
4 boot-loader-code 939f7fa1458e1f7ce968874d908e524fc0debf890383d355e4ce347b7b78a95c
5 boot-loader-config 864c61c5ea5ecbdb6951e6cb6d9c1f4b4eac79772f7fe13b8bece569d83d3768
6 - 3d458cfe55cc03ea1f443f1562beec8df51c75e14a9fcf9a7234a13f198e7969
7 secure-boot-policy 9c905bd9b9891bfb889b90a54c4b537b889cfa817c4389cc25754823a9443255
8 - 0000000000000000000000000000000000000000000000000000000000000000
9 kernel-initrd 9caa29b128113ef42aa53d421f03437be57211e5ebafc0fa8b5d4514ee37ff0c
10 ima 5ea9e3dab53eb6b483b6ec9e3b2c712bea66bca1b155637841216e0094387400
11 kernel-boot 0000000000000000000000000000000000000000000000000000000000000000
12 kernel-config 627ffa4b405e911902fe1f1a8b0164693b31acab04f805f15bccfe2209c7eace
13 sysexts 0000000000000000000000000000000000000000000000000000000000000000
14 shim-policy 0000000000000000000000000000000000000000000000000000000000000000
15 system-identity 0000000000000000000000000000000000000000000000000000000000000000
16 debug 0000000000000000000000000000000000000000000000000000000000000000
17 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
18 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
19 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
20 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
22 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
23 application-support 0000000000000000000000000000000000000000000000000000000000000000</programlisting>
</example>
</refsect2>
<refsect2>
<title><command>systemd-analyze nvpcrs <optional><replaceable>NVPCR</replaceable>…</optional></command></title>
<para>This command shows the known TPM2 NvPCRs (additional PCRs stored in TPM2 NV indexes) along with
their identifying names and current values.</para>
<example>
<title>Example Output</title>
<programlisting>$ systemd-analyze nvpcrs
NAME NVINDEX VALUE
cryptsetup 0x1d10201 f400543943cc7215557ce672872ace5382e6d53177cc459078ba9277e41588d9
hardware 0x1d10200 e155474936d7d74c893e6ece1099a2311d572cf23becea159dabf282db754284</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v259"/>
</refsect2>
<refsect2>
<title><command>systemd-analyze srk <optional>><replaceable>FILE</replaceable></optional></command></title>
<para>This command reads the Storage Root Key (SRK) from the TPM2 device, and writes it in marshalled
TPM2B_PUBLIC format to stdout. The output is non-printable data, so it should be redirected to a file
or into a pipe.</para>
<example>
<title>Save the Storage Root Key to <filename>srk.tpm2b_public</filename></title>
<programlisting>systemd-analyze srk >srk.tpm2b_public</programlisting>
</example>
</refsect2>
<refsect2>
<title><command>systemd-analyze architectures <optional><replaceable>NAME</replaceable>...</optional></command></title>
<para>Lists all known CPU architectures, and which ones are native. The listed architecture names are
those <varname>ConditionArchitecture=</varname> supports, see
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
details. If architecture names are specified only those specified are listed.</para>
<example>
<title>Table output</title>
<programlisting>$ systemd-analyze architectures
NAME SUPPORT
alpha foreign
arc foreign
arc-be foreign
arm foreign
arm64 foreign
…
sparc foreign
sparc64 foreign
tilegx foreign
x86 secondary
x86-64 native</programlisting>
</example>
</refsect2>
<refsect2>
<title><command>systemd-analyze smbios11</command></title>
<para>Shows a list of SMBIOS Type #11 strings passed to the system. Also see
<citerefentry><refentrytitle>smbios-type-11</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
<example>
<title>Example output</title>
<programlisting>$ systemd-analyze smbios11
io.systemd.stub.kernel-cmdline-extra=console=ttyS0
io.systemd.credential.binary:ssh.ephemeral-authorized_keys-all=c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSURGd20xbFp4WlRGclJteG9ZQlozOTYzcE1uYlJCaDMwM1MxVXhLSUM2NmYgbGVubmFydEB6ZXRhCg==
io.systemd.credential:vmm.notify_socket=vsock-stream:2:254570042
3 SMBIOS Type #11 strings passed.
</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v257"/>
</refsect2>
<refsect2>
<title><command>systemd-analyze chid</command></title>
<para>Shows a list of Computer Hardware IDs (CHIDs) of the local system. These IDs identify the
system's computer hardware, based on SMBIOS data. See <ulink
url="https://learn.microsoft.com/en-us/windows-hardware/drivers/dashboard/using-chids">Using Computer
Hardware IDs (CHIDs)</ulink> for details about CHIDs.</para>
<example>
<title>Example output</title>
<programlisting>$ systemd-analyze chid
TYPE INPUT CHID
3 MFPSmp 520537c0-3b59-504f-b062-9682ea236b21
4 MFPS-- edf05dc8-a53d-5b2c-8023-630bca2a2463
5 MFP--- ebc6a4d9-ec48-537a-916b-c69fa4fdd814
6 M--Smp 5ebe4bba-f598-5e90-9ff2-9fd0d3211465
7 M--S-- 1a3fb835-b42a-5f9c-a38c-eff5bfd5c41d
8 M-P-mp 2a831dce-8163-5bad-8406-435b8c752dd8
9 M-P--- 7c21c878-4a75-50f7-9816-21e811588da0
10 MF--mp 9a003537-bcc5-500e-b10a-8d8892e4fc64
11 MF---- bb9122bb-8a5c-50d2-a742-a85beb719909
13 M---mp bfc36935-5032-5987-a0a3-6311f01de33a
LEGEND: M → sys_vendor (LENOVO) ┄ F → product_family (ThinkPad X1 Carbon Gen 9) ┄ P → product_name (20XW0055GE)
S → product_sku (LENOVO_MT_20XW_BU_Think_FM_ThinkPad X1 Carbon Gen 9) ┄ m → board_vendor (LENOVO)
p → board_name (20XW0055GE)</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v258"/>
</refsect2>
<refsect2>
<title><command>systemd-analyze transient-settings <replaceable>TYPE</replaceable>...</command></title>
<para>Lists properties that can be set for various unit types via command line interfaces, in
particular
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
<command>set-property</command> and <option>--property=</option>/<option>--automount-property=</option>
options in
<citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, and
<citerefentry><refentrytitle>systemd-mount</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
Those assignments are possible for a subset of the properties that can be set in config files, see
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
and the other unit-type-specific pages. The <replaceable>TYPE</replaceable> argument must be a unit
type ("service", "socket", …). The properties that apply to the specific types are listed.</para>
<para>Note: D-Bus properties documented in
<citerefentry><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
form a partially overlapping set with the lists generated by this command. Many D-Bus properties and
transient settings share the same names, but for example, <varname>LogRateLimitIntervalSec=</varname>
is described in
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> and
would be listed by this command, but the corresponding D-Bus property described in
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> is
<varname>LogRateLimitIntervalUSec</varname>.
</para>
<para>This verb is intended primarily for programmatic generation of shell completions.</para>
<xi:include href="version-info.xml" xpointer="v258"/>
</refsect2>
<refsect2>
<title><command>systemd-analyze unit-shell <replaceable>SERVICE</replaceable> <optional><replaceable>command</replaceable>...</optional></command></title>
<para>The given command runs on the namespace of the specified running service. If no command is given,
spawn and attach a shell with the namespace to the service.</para>
<example>
<title>Example output</title>
<programlisting>$ systemd-analyze unit-shell systemd-resolved.service ls
bin dev etc home lib lib64 lost+found mnt proc run srv tmp var vmlinuz.old
boot efi exitrd init lib32 libx32 media opt root sbin sys usr vmlinuz work</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v258"/>
</refsect2>
<refsect2>
<title><command>systemd-analyze unit-gdb <replaceable>SERVICE</replaceable></command></title>
<para>Spawn and attach a debugger to the given service. By default,
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
will be used. This may be changed using the <option>--debugger=</option> option or the
<varname>$SYSTEMD_DEBUGGER</varname> environment variable. Use the <option>--debugger-arguments=</option> option
to pass extra command line arguments to the debugger and quote as appropriate
when <replaceable>ARGS</replaceable> contain whitespace (See Example).</para>
<example>
<programlisting>$ systemd-analyze --debugger-arguments="-batch -ex 'info all-registers'" unit-gdb systemd-oomd.service</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v258"/>
</refsect2>
</refsect1>
<refsect1>
<title>Options</title>
<para>The following options are understood:</para>
<variablelist>
<varlistentry>
<term><option>--system</option></term>
<listitem><para>Operates on the system systemd instance. This
is the implied default.</para>
<xi:include href="version-info.xml" xpointer="v209"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--user</option></term>
<listitem><para>Operates on the user systemd
instance.</para>
<xi:include href="version-info.xml" xpointer="v186"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--global</option></term>
<listitem><para>Operates on the system-wide configuration for
user systemd instance.</para>
<xi:include href="version-info.xml" xpointer="v238"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--order</option></term>
<term><option>--require</option></term>
<listitem><para>When used in conjunction with the <command>dot</command> command (see above),
selects which dependencies are shown in the dependency graph. If <option>--order</option> is passed,
only dependencies of type <varname>After=</varname> or <varname>Before=</varname> are shown.
If <option>--require</option> is passed, only dependencies of type <varname>Requires=</varname>,
<varname>Requisite=</varname>, <varname>BindsTo=</varname>, <varname>Wants=</varname>, and
<varname>Conflicts=</varname> are shown. If neither is passed, this shows dependencies of
all these types.</para>
<xi:include href="version-info.xml" xpointer="v198"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--from-pattern=</option></term>
<term><option>--to-pattern=</option></term>
<listitem><para>When used in conjunction with the
<command>dot</command> command (see above), this selects which
relationships are shown in the dependency graph. Both options
require a
<citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
pattern as an argument, which will be matched against the
left-hand and the right-hand, respectively, nodes of a
relationship.</para>
<para>Each of these can be used more than once, in which case
the unit name must match one of the values. When tests for
both sides of the relation are present, a relation must pass
both tests to be shown. When patterns are also specified as
positional arguments, they must match at least one side of the
relation. In other words, patterns specified with those two
options will trim the list of edges matched by the positional
arguments, if any are given, and fully determine the list of
edges shown otherwise.</para>
<xi:include href="version-info.xml" xpointer="v201"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--fuzz=<replaceable>timespan</replaceable></option></term>
<listitem><para>When used in conjunction with the
<command>critical-chain</command> command (see above), also
show units, which finished <replaceable>timespan</replaceable>
earlier, than the latest unit in the same level. The unit of
<replaceable>timespan</replaceable> is seconds unless
specified with a different unit, e.g.
"50ms".</para>
<xi:include href="version-info.xml" xpointer="v203"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--man=no</option></term>
<listitem><para>Do not invoke
<citerefentry project='man-pages'><refentrytitle>man</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to verify the existence of man pages listed in <varname>Documentation=</varname>.</para>
<xi:include href="version-info.xml" xpointer="v235"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--generators</option></term>
<listitem><para>Invoke unit generators, see
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
Some generators require root privileges. Under a normal user, running with
generators enabled will generally result in some warnings.</para>
<xi:include href="version-info.xml" xpointer="v235"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--instance=NAME</option></term>
<listitem>
<para>Specifies fallback instance name for template units. This will be used when one or more
template units without an instance name (e.g. <filename>foo@.service</filename>) specified for
<command>systemd-analyze condition</command> with <option>--unit=</option>,
<command>systemd-analyze security</command>, and <command>systemd-analyze verify</command>.
If unspecified, <literal>test_instance</literal> will be used.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--recursive-errors=<replaceable>MODE</replaceable></option></term>
<listitem><para>Control verification of units and their dependencies and whether
<command>systemd-analyze verify</command> exits with a non-zero process exit status or not. With
<command>yes</command>, return a non-zero process exit status when warnings arise during verification
of either the specified unit or any of its associated dependencies. With <command>no</command>,
return a non-zero process exit status when warnings arise during verification of only the specified
unit. With <command>one</command>, return a non-zero process exit status when warnings arise during
verification of either the specified unit or its immediate dependencies. If this option is not
specified, zero is returned as the exit status regardless whether warnings arise during verification
or not.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--root=<replaceable>PATH</replaceable></option></term>
<listitem><para>With <command>cat-config</command>, <command>verify</command>,
<command>condition</command>, <command>unit-gdb</command>, and <command>security</command> when
used with <option>--offline=</option>, operate on files underneath the specified root path
<replaceable>PATH</replaceable>.</para>
<xi:include href="version-info.xml" xpointer="v239"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--image=<replaceable>PATH</replaceable></option></term>
<listitem><para>With <command>cat-config</command>, <command>verify</command>,
<command>condition</command> and <command>security</command> when used with
<option>--offline=</option>, operate on files inside the specified image path
<replaceable>PATH</replaceable>.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="image-policy-open" />
<varlistentry>
<term><option>--offline=<replaceable>BOOL</replaceable></option></term>
<listitem><para>With <command>security</command>, perform an offline security review
of the specified unit files, i.e. does not have to rely on PID 1 to acquire security
information for the files like the <command>security</command> verb when used by itself does.
This means that <option>--offline=</option> can be used with <option>--root=</option> and
<option>--image=</option> as well. If a unit's overall exposure level is above that set by
<option>--threshold=</option> (default value is 100), <option>--offline=</option> will return
an error.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--profile=<replaceable>PATH</replaceable></option></term>
<listitem><para>With <command>security</command> <option>--offline=</option>, takes into
consideration the specified portable profile when assessing unit settings.
The profile can be passed by name, in which case the well-known system locations will
be searched, or it can be the full path to a specific drop-in file.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--threshold=<replaceable>NUMBER</replaceable></option></term>
<listitem><para>With <command>security</command>, allow the user to set a custom value
to compare the overall exposure level with, for the specified unit files. If a unit's
overall exposure level, is greater than that set by the user, <command>security</command>
will return an error. <option>--threshold=</option> can be used with <option>--offline=</option>
as well and its default value is 100.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--security-policy=<replaceable>PATH</replaceable></option></term>
<listitem><para>With <command>security</command>, allow the user to define a custom set of
requirements formatted as a JSON file against which to compare the specified unit file(s)
and determine their overall exposure level to security threats.</para>
<table>
<title>Accepted Assessment Test Identifiers</title>
<tgroup cols='1'>
<colspec colname='directive' />
<thead>
<row>
<entry>Assessment Test Identifier</entry>
</row>
</thead>
<tbody>
<row>
<entry>UserOrDynamicUser</entry>
</row>
<row>
<entry>SupplementaryGroups</entry>
</row>
<row>
<entry>PrivateMounts</entry>
</row>
<row>
<entry>PrivateDevices</entry>
</row>
<row>
<entry>PrivateTmp</entry>
</row>
<row>
<entry>PrivateNetwork</entry>
</row>
<row>
<entry>PrivateUsers</entry>
</row>
<row>
<entry>ProtectControlGroups</entry>
</row>
<row>
<entry>ProtectKernelModules</entry>
</row>
<row>
<entry>ProtectKernelTunables</entry>
</row>
<row>
<entry>ProtectKernelLogs</entry>
</row>
<row>
<entry>ProtectClock</entry>
</row>
<row>
<entry>ProtectHome</entry>
</row>
<row>
<entry>ProtectHostname</entry>
</row>
<row>
<entry>ProtectSystem</entry>
</row>
<row>
<entry>RootDirectoryOrRootImage</entry>
</row>
<row>
<entry>LockPersonality</entry>
</row>
<row>
<entry>MemoryDenyWriteExecute</entry>
</row>
<row>
<entry>NoNewPrivileges</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_ADMIN</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SET_UID_GID_PCAP</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_PTRACE</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_TIME</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_NET_ADMIN</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_RAWIO</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_MODULE</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_AUDIT</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYSLOG</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_NICE_RESOURCE</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_MKNOD</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_CHOWN_FSETID_SETFCAP</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_DAC_FOWNER_IPC_OWNER</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_KILL</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_NET_BIND_SERVICE_BROADCAST_RAW</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_BOOT</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_MAC</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_LINUX_IMMUTABLE</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_IPC_LOCK</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_CHROOT</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_BLOCK_SUSPEND</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_WAKE_ALARM</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_LEASE</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_SYS_TTY_CONFIG</entry>
</row>
<row>
<entry>CapabilityBoundingSet_CAP_BPF</entry>
</row>
<row>
<entry>UMask</entry>
</row>
<row>
<entry>KeyringMode</entry>
</row>
<row>
<entry>ProtectProc</entry>
</row>
<row>
<entry>ProcSubset</entry>
</row>
<row>
<entry>NotifyAccess</entry>
</row>
<row>
<entry>RemoveIPC</entry>
</row>
<row>
<entry>Delegate</entry>
</row>
<row>
<entry>RestrictRealtime</entry>
</row>
<row>
<entry>RestrictSUIDSGID</entry>
</row>
<row>
<entry>RestrictNamespaces_user</entry>
</row>
<row>
<entry>RestrictNamespaces_mnt</entry>
</row>
<row>
<entry>RestrictNamespaces_ipc</entry>
</row>
<row>
<entry>RestrictNamespaces_pid</entry>
</row>
<row>
<entry>RestrictNamespaces_cgroup</entry>
</row>
<row>
<entry>RestrictNamespaces_uts</entry>
</row>
<row>
<entry>RestrictNamespaces_net</entry>
</row>
<row>
<entry>RestrictAddressFamilies_AF_INET_INET6</entry>
</row>
<row>
<entry>RestrictAddressFamilies_AF_UNIX</entry>
</row>
<row>
<entry>RestrictAddressFamilies_AF_NETLINK</entry>
</row>
<row>
<entry>RestrictAddressFamilies_AF_PACKET</entry>
</row>
<row>
<entry>RestrictAddressFamilies_OTHER</entry>
</row>
<row>
<entry>SystemCallArchitectures</entry>
</row>
<row>
<entry>SystemCallFilter_swap</entry>
</row>
<row>
<entry>SystemCallFilter_obsolete</entry>
</row>
<row>
<entry>SystemCallFilter_clock</entry>
</row>
<row>
<entry>SystemCallFilter_cpu_emulation</entry>
</row>
<row>
<entry>SystemCallFilter_debug</entry>
</row>
<row>
<entry>SystemCallFilter_mount</entry>
</row>
<row>
<entry>SystemCallFilter_module</entry>
</row>
<row>
<entry>SystemCallFilter_raw_io</entry>
</row>
<row>
<entry>SystemCallFilter_reboot</entry>
</row>
<row>
<entry>SystemCallFilter_privileged</entry>
</row>
<row>
<entry>SystemCallFilter_resources</entry>
</row>
<row>
<entry>IPAddressDeny</entry>
</row>
<row>
<entry>DeviceAllow</entry>
</row>
<row>
<entry>AmbientCapabilities</entry>
</row>
</tbody>
</tgroup>
</table>
<para>See example "JSON Policy" below.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--json=<replaceable>MODE</replaceable></option></term>
<listitem><para>With the <command>security</command> command, generate a JSON formatted
output of the security analysis table. The format is a JSON array with objects
containing the following fields: <varname>set</varname> which indicates if the setting has
been enabled or not, <varname>name</varname> which is what is used to refer to the setting,
<varname>json_field</varname> which is the JSON compatible identifier of the setting,
<varname>description</varname> which is an outline of the setting state, and
<varname>exposure</varname> which is a number in the range 0.0…10.0, where a higher value
corresponds to a higher security threat. The JSON version of the table is printed to standard
output. The <replaceable>MODE</replaceable> passed to the option can be one of three:
<option>off</option> which is the default, <option>pretty</option> and <option>short</option>
which respectively output a prettified or shorted JSON version of the security table.
With the <command>plot</command> command, generate a JSON formatted output of the raw time data.
The format is a JSON array with objects containing the following fields: <varname>name</varname>
which is the unit name, <varname>activated</varname> which is the time after startup the
service was activated, <varname>activating</varname> which is how long after startup the service
was initially started, <varname>time</varname> which is how long the service took to activate
from when it was initially started, <varname>deactivated</varname> which is the time after startup
that the service was deactivated, <varname>deactivating</varname> which is the time after startup
that the service was initially told to deactivate.
</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--iterations=<replaceable>NUMBER</replaceable></option></term>
<listitem><para>When used with the <command>calendar</command> command, show the specified number of
iterations the specified calendar expression will elapse next. Defaults to 1.</para>
<xi:include href="version-info.xml" xpointer="v242"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--base-time=<replaceable>TIMESTAMP</replaceable></option></term>
<listitem><para>When used with the <command>calendar</command> command, show next iterations relative
to the specified point in time. If not specified, defaults to the current time.</para>
<xi:include href="version-info.xml" xpointer="v244"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--unit=<replaceable>UNIT</replaceable></option></term>
<listitem><para>When used with the <command>condition</command> command, evaluate all the
<varname index="false">Condition*=...</varname> and <varname index="false">Assert*=...</varname>
assignments in the specified unit file. The full unit search path is formed by combining the
directories for the specified unit with the usual unit load paths. The variable
<varname>$SYSTEMD_UNIT_PATH</varname> is supported, and may be used to replace or augment the
compiled in set of unit load paths; see
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. All
units files present in the directory containing the specified unit will be used in preference to the
other paths. If a template unit without an instance name is specified (e.g.
<filename>foo@.service</filename>), <literal>test_instance</literal> will be used as the instance
name, which can be controlled by <option>--instance=</option> option.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--table</option></term>
<listitem><para>When used with the <command>plot</command> command, the raw time data is output in a table.
</para>
<xi:include href="version-info.xml" xpointer="v253"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--no-legend</option></term>
<listitem><para>When used with the <command>plot</command> command in combination with either
<option>--table</option> or <option>--json=</option>, no legends or hints are included in the output.
</para>
<xi:include href="version-info.xml" xpointer="v253"/></listitem>
</varlistentry>
<xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" />
<varlistentry>
<term><option>-q</option></term>
<term><option>--quiet</option></term>
<listitem><para>Suppress hints and other non-essential output.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--tldr</option></term>
<listitem><para>With <command>cat-config</command>, only print the "interesting" parts of the
configuration files, skipping comments and empty lines and section headers followed only by
comments and empty lines.</para>
<xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--scale-svg=<replaceable>FACTOR</replaceable></option></term>
<listitem><para>When used with the <command>plot</command> command, the x-axis of the plot
can be stretched by FACTOR (default: 1.0).</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--detailed</option></term>
<listitem><para>When used with the <command>plot</command> command, activation timestamps
details can be seen in SVG plot.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--drm-device=<replaceable>PATH</replaceable></option></term>
<listitem><para>When provided with the <command>chid</command> command, use this sysfs path to a DRM
device to fetch EDID from. Example: <filename>/sys/class/drm/card1-HDMI-A-1/</filename></para>
<xi:include href="version-info.xml" xpointer="v258"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--debugger=<replaceable>DEBUGGER</replaceable></option></term>
<listitem><para>Use the given debugger for the <command>unit-gdb</command> command. If not given and
<varname>$SYSTEMD_DEBUGGER</varname> is unset, then
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
will be used.</para>
<xi:include href="version-info.xml" xpointer="v258"/></listitem>
</varlistentry>
<varlistentry>
<term><option>-A</option> <replaceable>ARGS</replaceable></term>
<term><option>--debugger-arguments=<replaceable>ARGS</replaceable></option></term>
<listitem><para>Pass the given <replaceable>ARGS</replaceable> as extra command line arguments to the debugger.</para>
<xi:include href="version-info.xml" xpointer="v258"/></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
</variablelist>
</refsect1>
<refsect1>
<title>Exit status</title>
<para>For most verbs, <constant>0</constant> is returned on success, and a non-zero failure code
otherwise.</para>
<para>For the verb <command>compare-versions</command>, in the two-argument form,
<constant>12</constant>, <constant>0</constant>, or <constant>11</constant> are returned if the second
version string is respectively larger than, equal to, or smaller than the first. In the three-argument
form, <constant>0</constant> or <constant>1</constant> are returned when the condition is respectively
true or false.</para>
<para>For the verb <command>has-tpm2</command>, <constant>0</constant> is returned if a TPM2 device is
discovered, supported, and used by firmware, driver, and userspace (i.e. <command>systemd</command>).
Otherwise, the OR combination of the value <constant>1</constant> (in case firmware support is missing),
<constant>2</constant> (in case driver support is missing), and <constant>4</constant> (in case userspace
support is missing). If no TPM2 support is available at all, value <constant>7</constant> is hence
returned.</para>
</refsect1>
<xi:include href="common-variables.xml" />
<refsect1>
<title>Examples</title>
<example>
<title>JSON Policy</title>
<para>The JSON file passed as a path parameter to <option>--security-policy=</option> has a top-level
JSON object, with keys being the assessment test identifiers mentioned above. The values in the file
should be JSON objects with one or more of the following fields: <option>description_na</option>
(string), <option>description_good</option> (string), <option>description_bad</option> (string),
<option>weight</option> (unsigned integer), and <option>range</option> (unsigned integer). If any of
these fields corresponding to a specific id of the unit file is missing from the JSON object, the
default built-in field value corresponding to that same id is used for security analysis as default.
The weight and range fields are used in determining the overall exposure level of the unit files: the
value of each setting is assigned a badness score, which is multiplied by the policy weight and divided
by the policy range to determine the overall exposure that the setting implies. The computed badness is
summed across all settings in the unit file, normalized to the 1…100 range, and used to determine the
overall exposure level of the unit. By allowing users to manipulate these fields, the 'security' verb
gives them the option to decide for themself which ids are more important and hence should have a
greater effect on the exposure level. A weight of <literal>0</literal> means the setting will not be
checked.</para>
<programlisting>
{
"PrivateDevices":
{
"description_good": "Service has no access to hardware devices",
"description_bad": "Service potentially has access to hardware devices",
"weight": 1000,
"range": 1
},
"PrivateMounts":
{
"description_good": "Service cannot install system mounts",
"description_bad": "Service may install system mounts",
"weight": 1000,
"range": 1
},
"PrivateNetwork":
{
"description_good": "Service has no access to the host's network",
"description_bad": "Service has access to the host's network",
"weight": 2500,
"range": 1
},
"PrivateTmp":
{
"description_good": "Service has no access to other software's temporary files",
"description_bad": "Service has access to other software's temporary files",
"weight": 1000,
"range": 1
},
"PrivateUsers":
{
"description_good": "Service does not have access to other users",
"description_bad": "Service has access to other users",
"weight": 1000,
"range": 1
}
}
</programlisting>
</example>
</refsect1>
<refsect1>
<title>See Also</title>
<para><simplelist type="inline">
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
</simplelist></para>
</refsect1>