| 1 |
<?xml version='1.0'?> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
| 4 |
<!ENTITY % entities SYSTEM "custom-entities.ent" > |
| 5 |
%entities; |
| 6 |
]> |
| 7 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 8 |
|
| 9 |
<refentry id="systemd-report" |
| 10 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 11 |
|
| 12 |
<refentryinfo> |
| 13 |
<title>systemd-report</title> |
| 14 |
<productname>systemd</productname> |
| 15 |
</refentryinfo> |
| 16 |
|
| 17 |
<refmeta> |
| 18 |
<refentrytitle>systemd-report</refentrytitle> |
| 19 |
<manvolnum>1</manvolnum> |
| 20 |
</refmeta> |
| 21 |
|
| 22 |
<refnamediv> |
| 23 |
<refname>systemd-report</refname> |
| 24 |
<refpurpose>Generate report of system metrics</refpurpose> |
| 25 |
</refnamediv> |
| 26 |
|
| 27 |
<refsynopsisdiv> |
| 28 |
<cmdsynopsis> |
| 29 |
<command>systemd-report</command> <arg choice="opt" rep="repeat">OPTIONS</arg> |
| 30 |
</cmdsynopsis> |
| 31 |
</refsynopsisdiv> |
| 32 |
|
| 33 |
<refsect1> |
| 34 |
<title>Description</title> |
| 35 |
|
| 36 |
<para><emphasis>Note: this command is experimental for now. While it is likely to become a regular |
| 37 |
component of systemd, it might still change in behaviour and interface.</emphasis></para> |
| 38 |
|
| 39 |
<para><command>systemd-report</command> requests metrics from the system and writes them to |
| 40 |
standard output.</para> |
| 41 |
</refsect1> |
| 42 |
|
| 43 |
<refsect1> |
| 44 |
<title>Commands</title> |
| 45 |
|
| 46 |
<para>The following commands are understood:</para> |
| 47 |
|
| 48 |
<variablelist> |
| 49 |
<varlistentry> |
| 50 |
<term><command>metrics</command> <arg choice="opt" rep="repeat">MATCH</arg></term> |
| 51 |
|
| 52 |
<listitem><para>Acquire a list of metrics values from all local services providing them, and write |
| 53 |
them to standard output. Optionally takes one or more match expressions for filtering the metrics to |
| 54 |
show. The expression either may be a literal metric family name to search for, or a prefix of one |
| 55 |
(which will be matched only at dot boundaries). If multiple matches are specified as multiple |
| 56 |
parameters, any metric matching <emphasis>any</emphasis> of the specified matches are shown.</para> |
| 57 |
|
| 58 |
<xi:include href="version-info.xml" xpointer="v260"/></listitem> |
| 59 |
</varlistentry> |
| 60 |
|
| 61 |
<varlistentry> |
| 62 |
<term><command>describe</command> <arg choice="opt" rep="repeat">MATCH</arg></term> |
| 63 |
|
| 64 |
<listitem><para>Acquire a list of metric families from all local services providing them, and write |
| 65 |
them to standard output. This returns primarily static information about metrics, their data types |
| 66 |
and human readable description, without values.</para> |
| 67 |
|
| 68 |
<para>Match expressions supported by <command>metrics</command> are supported by |
| 69 |
<command>describe</command> too.</para> |
| 70 |
|
| 71 |
<xi:include href="version-info.xml" xpointer="v260"/></listitem> |
| 72 |
</varlistentry> |
| 73 |
|
| 74 |
<varlistentry> |
| 75 |
<term><command>generate</command> <arg choice="opt" rep="repeat">MATCH</arg></term> |
| 76 |
|
| 77 |
<listitem><para>Acquire a list of metrics and build a JSON report.</para> |
| 78 |
|
| 79 |
<para>Match expressions supported by <command>metrics</command> are supported here too.</para> |
| 80 |
|
| 81 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 82 |
</varlistentry> |
| 83 |
|
| 84 |
<varlistentry> |
| 85 |
<term><command>upload</command> <arg choice="opt" rep="repeat">MATCH</arg></term> |
| 86 |
|
| 87 |
<listitem><para>This command can be used to send the report built by <command>generate</command> |
| 88 |
to an external server. Two upload mechanisms are supported. If an <literal>http://</literal> or |
| 89 |
<literal>https://</literal> URL is specified with <option>--url=</option>, an HTTP upload will be |
| 90 |
performed to the specified location. Otherwise, any sockets under |
| 91 |
<filename>/run/systemd/report.upload/</filename> will be used to call |
| 92 |
<function>io.systemd.Report.Uploader.Upload()</function>.</para> |
| 93 |
|
| 94 |
<para>Match expressions supported by <command>metrics</command> are supported here too.</para> |
| 95 |
|
| 96 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 97 |
</varlistentry> |
| 98 |
|
| 99 |
<varlistentry> |
| 100 |
<term><command>list-sources</command></term> |
| 101 |
|
| 102 |
<listitem><para>Show list of known metrics sources.</para> |
| 103 |
|
| 104 |
<xi:include href="version-info.xml" xpointer="v260"/></listitem> |
| 105 |
</varlistentry> |
| 106 |
</variablelist> |
| 107 |
</refsect1> |
| 108 |
|
| 109 |
<refsect1> |
| 110 |
<title>Options</title> |
| 111 |
|
| 112 |
<para>The following options are understood:</para> |
| 113 |
|
| 114 |
<variablelist> |
| 115 |
<varlistentry> |
| 116 |
<term><option>--system</option></term> |
| 117 |
<term><option>--user</option></term> |
| 118 |
|
| 119 |
<listitem> |
| 120 |
<para>Query per-system metrics sources (the default), or the per-user metrics sources.</para> |
| 121 |
|
| 122 |
<xi:include href="version-info.xml" xpointer="v260"/> |
| 123 |
</listitem> |
| 124 |
</varlistentry> |
| 125 |
|
| 126 |
<xi:include href="standard-options.xml" xpointer="no-pager" /> |
| 127 |
<xi:include href="standard-options.xml" xpointer="json" /> |
| 128 |
<xi:include href="standard-options.xml" xpointer="j" /> |
| 129 |
<xi:include href="standard-options.xml" xpointer="no-legend" /> |
| 130 |
<xi:include href="standard-options.xml" xpointer="help" /> |
| 131 |
<xi:include href="standard-options.xml" xpointer="version" /> |
| 132 |
|
| 133 |
<varlistentry> |
| 134 |
<term><option>--url=<replaceable>URL</replaceable></option></term> |
| 135 |
|
| 136 |
<listitem><para>Upload the collected report to the specified address instead of writing it to |
| 137 |
standard output. <replaceable>URL</replaceable> must point to a server accepting POST requests with |
| 138 |
a JSON-formatted report body.</para> |
| 139 |
|
| 140 |
<para>Note: both <literal>http://</literal> and <literal>https://</literal> URLs are supported, but |
| 141 |
<emphasis>connections over plain HTTP are made without encryption</emphasis>. Thus, this mode should |
| 142 |
only be used in specific situations where integrity and confidentiality of the report is not required |
| 143 |
or is ensured through some other means. Using <literal>https://</literal> is recommended.</para> |
| 144 |
|
| 145 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 146 |
</varlistentry> |
| 147 |
|
| 148 |
<varlistentry> |
| 149 |
<term><option>--key=<replaceable>FILENAME</replaceable></option></term> |
| 150 |
|
| 151 |
<listitem><para>Takes a path to a SSL key file in PEM format, used for client certificate |
| 152 |
authentication when uploading. Can also be set to <literal>-</literal>, to disable client certificate |
| 153 |
authentication. Defaults to |
| 154 |
<filename>&CERTIFICATE_ROOT;/private/systemd-report.pem</filename>.</para> |
| 155 |
|
| 156 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 157 |
</varlistentry> |
| 158 |
|
| 159 |
<varlistentry> |
| 160 |
<term><option>--cert=<replaceable>FILENAME</replaceable></option></term> |
| 161 |
|
| 162 |
<listitem><para>Takes a path to a SSL certificate file in PEM format, used for client certificate |
| 163 |
authentication when uploading. Defaults to |
| 164 |
<filename>&CERTIFICATE_ROOT;/certs/systemd-report.pem</filename>.</para> |
| 165 |
|
| 166 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 167 |
</varlistentry> |
| 168 |
|
| 169 |
<varlistentry> |
| 170 |
<term><option>--trust=<replaceable>FILENAME</replaceable>|<constant>all</constant></option></term> |
| 171 |
|
| 172 |
<listitem><para>Takes a path to a SSL CA certificate file in PEM format used to verify the server |
| 173 |
certificate, or the literal string <constant>all</constant> to disable certificate checking |
| 174 |
entirely. Defaults to <filename>&CERTIFICATE_ROOT;/ca/trusted.pem</filename>.</para> |
| 175 |
|
| 176 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 177 |
</varlistentry> |
| 178 |
|
| 179 |
<varlistentry> |
| 180 |
<term><option>--network-timeout=<replaceable>SEC</replaceable></option></term> |
| 181 |
|
| 182 |
<listitem><para>Timeout for the network upload operation. Takes a value in seconds (or in other |
| 183 |
time units if suffixed with <literal>ms</literal>, <literal>min</literal>, <literal>h</literal>, |
| 184 |
etc.); see |
| 185 |
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry> |
| 186 |
for details. Defaults to 30 seconds.</para> |
| 187 |
|
| 188 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 189 |
</varlistentry> |
| 190 |
|
| 191 |
<varlistentry> |
| 192 |
<term><option>--extra-header=<replaceable>NAME</replaceable>: <replaceable>VALUE</replaceable></option></term> |
| 193 |
|
| 194 |
<listitem><para>Inject an additional HTTP header into the upload request. May be specified multiple |
| 195 |
times to add several headers. Passing an empty string clears any headers added by previous |
| 196 |
<option>--extra-header=</option> uses.</para> |
| 197 |
|
| 198 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 199 |
</varlistentry> |
| 200 |
</variablelist> |
| 201 |
|
| 202 |
</refsect1> |
| 203 |
|
| 204 |
<refsect1> |
| 205 |
<title>Exit status</title> |
| 206 |
|
| 207 |
<para>On success, 0 is returned, a non-zero failure code |
| 208 |
otherwise.</para> |
| 209 |
</refsect1> |
| 210 |
|
| 211 |
<refsect1> |
| 212 |
<title>See Also</title> |
| 213 |
<para><simplelist type="inline"> |
| 214 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 215 |
</simplelist></para> |
| 216 |
</refsect1> |
| 217 |
</refentry> |