Debian Codegraph @

upstream/mageia-cauldron/man1/systemd-analyze.1

raw
1 '\" t
2 .TH "SYSTEMD\-ANALYZE" "1" "" "systemd 258.7" "systemd-analyze"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-analyze \- Analyze and debug system manager
24 .SH "SYNOPSIS"
25 .HP \w'\fBsystemd\-analyze\fR\ 'u
26 \fBsystemd\-analyze\fR [OPTIONS...] [time]
27 .HP \w'\fBsystemd\-analyze\fR\ 'u
28 \fBsystemd\-analyze\fR [OPTIONS...] blame
29 .HP \w'\fBsystemd\-analyze\fR\ 'u
30 \fBsystemd\-analyze\fR [OPTIONS...] critical\-chain [\fIUNIT\fR...]
31 .HP \w'\fBsystemd\-analyze\fR\ 'u
32 \fBsystemd\-analyze\fR [OPTIONS...] dump [\fIPATTERN\fR...]
33 .HP \w'\fBsystemd\-analyze\fR\ 'u
34 \fBsystemd\-analyze\fR [OPTIONS...] plot [>file\&.svg]
35 .HP \w'\fBsystemd\-analyze\fR\ 'u
36 \fBsystemd\-analyze\fR [OPTIONS...] dot [\fIPATTERN\fR...] [>file\&.dot]
37 .HP \w'\fBsystemd\-analyze\fR\ 'u
38 \fBsystemd\-analyze\fR [OPTIONS...] unit\-files
39 .HP \w'\fBsystemd\-analyze\fR\ 'u
40 \fBsystemd\-analyze\fR [OPTIONS...] unit\-gdb \fISERVICE\fR
41 .HP \w'\fBsystemd\-analyze\fR\ 'u
42 \fBsystemd\-analyze\fR [OPTIONS...] unit\-paths
43 .HP \w'\fBsystemd\-analyze\fR\ 'u
44 \fBsystemd\-analyze\fR [OPTIONS...] unit\-shell \fISERVICE\fR [\fICommand\fR...]
45 .HP \w'\fBsystemd\-analyze\fR\ 'u
46 \fBsystemd\-analyze\fR [OPTIONS...] exit\-status [\fISTATUS\fR...]
47 .HP \w'\fBsystemd\-analyze\fR\ 'u
48 \fBsystemd\-analyze\fR [OPTIONS...] capability [\fICAPABILITY\fR... | {\-m\ |\ \-\-mask}\ \fIMASK\fR]
49 .HP \w'\fBsystemd\-analyze\fR\ 'u
50 \fBsystemd\-analyze\fR [OPTIONS...] condition \fICONDITION\fR\&...
51 .HP \w'\fBsystemd\-analyze\fR\ 'u
52 \fBsystemd\-analyze\fR [OPTIONS...] syscall\-filter [\fISET\fR\&...]
53 .HP \w'\fBsystemd\-analyze\fR\ 'u
54 \fBsystemd\-analyze\fR [OPTIONS...] filesystems [\fISET\fR\&...]
55 .HP \w'\fBsystemd\-analyze\fR\ 'u
56 \fBsystemd\-analyze\fR [OPTIONS...] calendar \fISPEC\fR...
57 .HP \w'\fBsystemd\-analyze\fR\ 'u
58 \fBsystemd\-analyze\fR [OPTIONS...] timestamp \fITIMESTAMP\fR...
59 .HP \w'\fBsystemd\-analyze\fR\ 'u
60 \fBsystemd\-analyze\fR [OPTIONS...] timespan \fISPAN\fR...
61 .HP \w'\fBsystemd\-analyze\fR\ 'u
62 \fBsystemd\-analyze\fR [OPTIONS...] cat\-config \fINAME\fR|\fIPATH\fR...
63 .HP \w'\fBsystemd\-analyze\fR\ 'u
64 \fBsystemd\-analyze\fR [OPTIONS...] compare\-versions \fIVERSION1\fR [\fIOP\fR] \fIVERSION2\fR
65 .HP \w'\fBsystemd\-analyze\fR\ 'u
66 \fBsystemd\-analyze\fR [OPTIONS...] verify \fIFILE\fR...
67 .HP \w'\fBsystemd\-analyze\fR\ 'u
68 \fBsystemd\-analyze\fR [OPTIONS...] security [\fIUNIT\fR...]
69 .HP \w'\fBsystemd\-analyze\fR\ 'u
70 \fBsystemd\-analyze\fR [OPTIONS...] inspect\-elf \fIFILE\fR...
71 .HP \w'\fBsystemd\-analyze\fR\ 'u
72 \fBsystemd\-analyze\fR [OPTIONS...] malloc [\fID\-BUS\ SERVICE\fR...]
73 .HP \w'\fBsystemd\-analyze\fR\ 'u
74 \fBsystemd\-analyze\fR [OPTIONS...] fdstore \fIUNIT\fR...
75 .HP \w'\fBsystemd\-analyze\fR\ 'u
76 \fBsystemd\-analyze\fR [OPTIONS...] image\-policy \fIPOLICY\fR...
77 .HP \w'\fBsystemd\-analyze\fR\ 'u
78 \fBsystemd\-analyze\fR [OPTIONS...] has\-tpm2
79 .HP \w'\fBsystemd\-analyze\fR\ 'u
80 \fBsystemd\-analyze\fR [OPTIONS...] pcrs [\fIPCR\fR...]
81 .HP \w'\fBsystemd\-analyze\fR\ 'u
82 \fBsystemd\-analyze\fR [OPTIONS...] srk [\fI>FILE\fR]
83 .HP \w'\fBsystemd\-analyze\fR\ 'u
84 \fBsystemd\-analyze\fR [OPTIONS...] architectures [\fINAME\fR...]
85 .HP \w'\fBsystemd\-analyze\fR\ 'u
86 \fBsystemd\-analyze\fR [OPTIONS...] smbios11
87 .HP \w'\fBsystemd\-analyze\fR\ 'u
88 \fBsystemd\-analyze\fR [OPTIONS...] chid
89 .HP \w'\fBsystemd\-analyze\fR\ 'u
90 \fBsystemd\-analyze\fR [OPTIONS...] transient\-settings \fITYPE\fR...
91 .SH "DESCRIPTION"
92 .PP
93 \fBsystemd\-analyze\fR
94 may be used to determine system boot\-up performance statistics and retrieve other state and tracing information from the system and service manager, and to verify the correctness of unit files\&. It is also used to access special functions useful for advanced system manager debugging\&.
95 .PP
96 If no command is passed,
97 \fBsystemd\-analyze time\fR
98 is implied\&.
99 .SS "systemd\-analyze time"
100 .PP
101 This command prints the time spent in the kernel before userspace has been reached, the time spent in the initrd before normal system userspace has been reached, and the time normal system userspace took to initialize\&. Note that these measurements simply measure the time passed up to the point where all system services have been spawned, but not necessarily until they fully finished initialization or the disk is idle\&.
102 .PP
103 \fBExample\ \&1.\ \&Show how long the boot took\fR
104 .sp
105 .if n \{\
106 .RS 4
107 .\}
108 .nf
109 # in a container
110 $ systemd\-analyze time
111 Startup finished in 296ms (userspace)
112 multi\-user\&.target reached after 275ms in userspace
113
114 # on a real machine
115 $ systemd\-analyze time
116 Startup finished in 2\&.584s (kernel) + 19\&.176s (initrd) + 47\&.847s (userspace) = 1min 9\&.608s
117 multi\-user\&.target reached after 47\&.820s in userspace
118 .fi
119 .if n \{\
120 .RE
121 .\}
122 .SS "systemd\-analyze blame"
123 .PP
124 This command prints a list of all running units, ordered by the time they took to initialize\&. This information may be used to optimize boot\-up times\&. Note that the output might be misleading as the initialization of one service might be slow simply because it waits for the initialization of another service to complete\&. Also note:
125 \fBsystemd\-analyze blame\fR
126 does not display results for services with
127 \fIType=simple\fR, because systemd considers such services to be started immediately, hence no measurement of the initialization delays can be done\&. Also note that this command only shows the time units took for starting up, it does not show how long unit jobs spent in the execution queue\&. In particular it shows the time units spent in
128 "activating"
129 state, which is not defined for units such as device units that transition directly from
130 "inactive"
131 to
132 "active"\&. This command hence gives an impression of the performance of program code, but cannot accurately reflect latency introduced by waiting for hardware and similar events\&.
133 .PP
134 \fBExample\ \&2.\ \&Show which units took the most time during boot\fR
135 .sp
136 .if n \{\
137 .RS 4
138 .\}
139 .nf
140 $ systemd\-analyze blame
141 32\&.875s pmlogger\&.service
142 20\&.905s systemd\-networkd\-wait\-online\&.service
143 13\&.299s dev\-vda1\&.device
144 \&.\&.\&.
145 23ms sysroot\&.mount
146 11ms initrd\-udevadm\-cleanup\-db\&.service
147 3ms sys\-kernel\-config\&.mount
148 .fi
149 .if n \{\
150 .RE
151 .\}
152 .SS "systemd\-analyze critical\-chain [\fIUNIT\fR\&.\&.\&.]"
153 .PP
154 This command prints a tree of the time\-critical chain of units (for each of the specified
155 \fIUNIT\fRs or for the default target otherwise)\&. The time after the unit is active or started is printed after the "@" character\&. The time the unit takes to start is printed after the "+" character\&. Note that the output might be misleading as the initialization of services might depend on socket activation and because of the parallel execution of units\&. Also, similarly to the
156 \fBblame\fR
157 command, this only takes into account the time units spent in
158 "activating"
159 state, and hence does not cover units that never went through an
160 "activating"
161 state (such as device units that transition directly from
162 "inactive"
163 to
164 "active")\&. Moreover, it does not show information on jobs (and in particular not jobs that timed out)\&.
165 .PP
166 \fBExample\ \&3.\ \&systemd\-analyze critical\-chain\fR
167 .sp
168 .if n \{\
169 .RS 4
170 .\}
171 .nf
172 $ systemd\-analyze critical\-chain
173 multi\-user\&.target @47\&.820s
174 └─pmie\&.service @35\&.968s +548ms
175 └─pmcd\&.service @33\&.715s +2\&.247s
176 └─network\-online\&.target @33\&.712s
177 └─systemd\-networkd\-wait\-online\&.service @12\&.804s +20\&.905s
178 └─systemd\-networkd\&.service @11\&.109s +1\&.690s
179 └─systemd\-udevd\&.service @9\&.201s +1\&.904s
180 └─systemd\-tmpfiles\-setup\-dev\&.service @7\&.306s +1\&.776s
181 └─kmod\-static\-nodes\&.service @6\&.976s +177ms
182 └─systemd\-journald\&.socket
183 └─system\&.slice
184 └─\-\&.slice
185 .fi
186 .if n \{\
187 .RE
188 .\}
189 .SS "systemd\-analyze dump [\fIpattern\fR\&...]"
190 .PP
191 Without any parameter, this command outputs a (usually very long) human\-readable serialization of the complete service manager state\&. Optional glob pattern may be specified, causing the output to be limited to units whose names match one of the patterns\&. The output format is subject to change without notice and should not be parsed by applications\&. This command is rate limited for unprivileged users\&.
192 .PP
193 \fBExample\ \&4.\ \&Show the internal state of user manager\fR
194 .sp
195 .if n \{\
196 .RS 4
197 .\}
198 .nf
199 $ systemd\-analyze \-\-user dump
200 Timestamp userspace: Thu 2019\-03\-14 23:28:07 CET
201 Timestamp finish: Thu 2019\-03\-14 23:28:07 CET
202 Timestamp generators\-start: Thu 2019\-03\-14 23:28:07 CET
203 Timestamp generators\-finish: Thu 2019\-03\-14 23:28:07 CET
204 Timestamp units\-load\-start: Thu 2019\-03\-14 23:28:07 CET
205 Timestamp units\-load\-finish: Thu 2019\-03\-14 23:28:07 CET
206 \-> Unit proc\-timer_list\&.mount:
207 Description: /proc/timer_list
208 \&.\&.\&.
209 \-> Unit default\&.target:
210 Description: Main user target
211 \&.\&.\&.
212 .fi
213 .if n \{\
214 .RE
215 .\}
216 .SS "systemd\-analyze malloc [\fID\-Bus service\fR\&...]"
217 .PP
218 This command can be used to request the output of the internal memory state (as returned by
219 \fBmalloc_info\fR(3)) of a D\-Bus service\&. If no service is specified, the query will be sent to
220 org\&.freedesktop\&.systemd1
221 (the system or user service manager)\&. The output format is not guaranteed to be stable and should not be parsed by applications\&.
222 .PP
223 The service must implement the
224 org\&.freedesktop\&.MemoryAllocation1
225 interface\&. In the systemd suite, it is currently only implemented by the manager\&.
226 .SS "systemd\-analyze plot"
227 .PP
228 This command prints either an SVG graphic, detailing which system services have been started at what time, highlighting the time they spent on initialization, or the raw time data in JSON or table format\&.
229 .PP
230 \fBExample\ \&5.\ \&Plot a bootchart\fR
231 .sp
232 .if n \{\
233 .RS 4
234 .\}
235 .nf
236 $ systemd\-analyze plot >bootup\&.svg
237 $ eog bootup\&.svg&
238 .fi
239 .if n \{\
240 .RE
241 .\}
242 .PP
243 Note that this plot is based on the most recent per\-unit timing data of loaded units\&. This means that if a unit gets started, then stopped and then started again the information shown will cover the most recent start cycle, not the first one\&. Thus it is recommended to consult this information only shortly after boot, so that this distinction does not matter\&. Moreover, units that are not referenced by any other unit through a dependency might be unloaded by the service manager once they terminate (and did not fail)\&. Such units will not show up in the plot\&.
244 .SS "systemd\-analyze dot [\fIpattern\fR\&.\&.\&.]"
245 .PP
246 This command generates textual dependency graph description in dot format for further processing with the GraphViz
247 \fBdot\fR(1)
248 tool\&. Use a command line like
249 \fBsystemd\-analyze dot | dot \-Tsvg >systemd\&.svg\fR
250 to generate a graphical dependency tree\&. Unless
251 \fB\-\-order\fR
252 or
253 \fB\-\-require\fR
254 is passed, the generated graph will show both ordering and requirement dependencies\&. Optional pattern globbing style specifications (e\&.g\&.
255 *\&.target) may be given at the end\&. A unit dependency is included in the graph if any of these patterns match either the origin or destination node\&.
256 .PP
257 \fBExample\ \&6.\ \&Plot all dependencies of any unit whose name starts with "avahi\-daemon"\fR
258 .sp
259 .if n \{\
260 .RS 4
261 .\}
262 .nf
263 $ systemd\-analyze dot \*(Aqavahi\-daemon\&.*\*(Aq | dot \-Tsvg >avahi\&.svg
264 $ eog avahi\&.svg
265 .fi
266 .if n \{\
267 .RE
268 .\}
269 .PP
270 \fBExample\ \&7.\ \&Plot the dependencies between all known target units\fR
271 .sp
272 .if n \{\
273 .RS 4
274 .\}
275 .nf
276 $ systemd\-analyze dot \-\-to\-pattern=\*(Aq*\&.target\*(Aq \-\-from\-pattern=\*(Aq*\&.target\*(Aq \e
277 | dot \-Tsvg >targets\&.svg
278 $ eog targets\&.svg
279 .fi
280 .if n \{\
281 .RE
282 .\}
283 .SS "systemd\-analyze unit\-paths"
284 .PP
285 This command outputs a list of all directories from which unit files,
286 \&.d
287 overrides, and
288 \&.wants,
289 \&.requires
290 symlinks may be loaded\&. Combine with
291 \fB\-\-user\fR
292 to retrieve the list for the user manager instance, and
293 \fB\-\-global\fR
294 for the global configuration of user manager instances\&.
295 .PP
296 \fBExample\ \&8.\ \&Show all paths for generated units\fR
297 .sp
298 .if n \{\
299 .RS 4
300 .\}
301 .nf
302 $ systemd\-analyze unit\-paths | grep \*(Aq^/run\*(Aq
303 /run/systemd/system\&.control
304 /run/systemd/transient
305 /run/systemd/generator\&.early
306 /run/systemd/system
307 /run/systemd/system\&.attached
308 /run/systemd/generator
309 /run/systemd/generator\&.late
310 .fi
311 .if n \{\
312 .RE
313 .\}
314 .PP
315 Note that this verb prints the list that is compiled into
316 \fBsystemd\-analyze\fR
317 itself, and does not communicate with the running manager\&. Use
318 .sp
319 .if n \{\
320 .RS 4
321 .\}
322 .nf
323 systemctl [\-\-user] [\-\-global] show \-p UnitPath \-\-value
324 .fi
325 .if n \{\
326 .RE
327 .\}
328 .sp
329 to retrieve the actual list that the manager uses, with any empty directories omitted\&.
330 .SS "systemd\-analyze exit\-status [\fISTATUS\fR\&.\&.\&.]"
331 .PP
332 This command prints a list of exit statuses along with their "class", i\&.e\&. the source of the definition (one of
333 "libc",
334 "systemd",
335 "LSB", or
336 "BSD"), see the Process Exit Codes section in
337 \fBsystemd.exec\fR(5)\&. If no additional arguments are specified, all known statuses are shown\&. Otherwise, only the definitions for the specified codes are shown\&.
338 .PP
339 \fBExample\ \&9.\ \&Show some example exit status names\fR
340 .sp
341 .if n \{\
342 .RS 4
343 .\}
344 .nf
345 $ systemd\-analyze exit\-status 0 1 {63\&.\&.65}
346 NAME STATUS CLASS
347 SUCCESS 0 libc
348 FAILURE 1 libc
349 \- 63 \-
350 USAGE 64 BSD
351 DATAERR 65 BSD
352 .fi
353 .if n \{\
354 .RE
355 .\}
356 .SS "systemd\-analyze capability [\fICAPABILITY\fR... | {\-m\ |\ \-\-mask}\ \fIMASK\fR]"
357 .PP
358 This command prints a list of Linux capabilities along with their numeric IDs\&. See
359 \fBcapabilities\fR(7)
360 for details\&. If no argument is specified the full list of capabilities known to the service manager and the kernel is shown\&. Capabilities defined by the kernel but not known to the service manager are shown as
361 "cap_???"\&. Optionally, if arguments are specified they may refer to specific cabilities by name or numeric ID, in which case only the indicated capabilities are shown in the table\&.
362 .PP
363 Alternatively, if
364 \fB\-\-mask\fR
365 is passed, a single numeric argument must be specified, which is interpreted as a hexadecimal capability mask\&. In this case, only the capabilities present in the mask are shown in the table\&. This mode is intended to aid in decoding capability sets available via various debugging interfaces (e\&.g\&.
366 "/proc/PID/status")\&.
367 .PP
368 \fBExample\ \&10.\ \&Show some example capability names\fR
369 .sp
370 .if n \{\
371 .RS 4
372 .\}
373 .nf
374 $ systemd\-analyze capability 0 1 {30\&.\&.32}
375 NAME NUMBER
376 cap_chown 0
377 cap_dac_override 1
378 cap_audit_control 30
379 cap_setfcap 31
380 cap_mac_override 32
381 .fi
382 .if n \{\
383 .RE
384 .\}
385 .PP
386 \fBExample\ \&11.\ \&Decode a capability mask extracted from /proc\fR
387 .sp
388 .if n \{\
389 .RS 4
390 .\}
391 .nf
392 $ systemd\-analyze capability \-m 0000000000003c00
393 NAME NUMBER
394 cap_net_bind_service 10
395 cap_net_broadcast 11
396 cap_net_admin 12
397 cap_net_raw 13
398 .fi
399 .if n \{\
400 .RE
401 .\}
402 .SS "systemd\-analyze condition \fICONDITION\fR\&.\&.\&."
403 .PP
404 This command will evaluate
405 \fICondition*=\&.\&.\&.\fR
406 and
407 \fIAssert*=\&.\&.\&.\fR
408 assignments, and print their values, and the resulting value of the combined condition set\&. See
409 \fBsystemd.unit\fR(5)
410 for a list of available conditions and asserts\&.
411 .PP
412 \fBExample\ \&12.\ \&Evaluate conditions that check kernel versions\fR
413 .sp
414 .if n \{\
415 .RS 4
416 .\}
417 .nf
418 $ systemd\-analyze condition \*(AqConditionVersion = ! <4\&.0\*(Aq \e
419 \*(AqConditionVersion = >=5\&.1\*(Aq \e
420 \*(AqConditionACPower=|false\*(Aq \e
421 \*(AqConditionArchitecture=|!arm\*(Aq \e
422 \*(AqAssertPathExists=/etc/os\-release\*(Aq
423 test\&.service: AssertPathExists=/etc/os\-release succeeded\&.
424 Asserts succeeded\&.
425 test\&.service: ConditionArchitecture=|!arm succeeded\&.
426 test\&.service: ConditionACPower=|false failed\&.
427 test\&.service: ConditionVersion=>=5\&.1 succeeded\&.
428 test\&.service: ConditionVersion=!<4\&.0 succeeded\&.
429 Conditions succeeded\&.
430 .fi
431 .if n \{\
432 .RE
433 .\}
434 .SS "systemd\-analyze syscall\-filter [\fISET\fR\&.\&.\&.]"
435 .PP
436 This command will list system calls contained in the specified system call set
437 \fISET\fR, or all known sets if no sets are specified\&. Argument
438 \fISET\fR
439 must include the
440 "@"
441 prefix\&.
442 .SS "systemd\-analyze filesystems [\fISET\fR\&.\&.\&.]"
443 .PP
444 This command will list filesystems in the specified filesystem set
445 \fISET\fR, or all known sets if no sets are specified\&. Argument
446 \fISET\fR
447 must include the
448 "@"
449 prefix\&.
450 .SS "systemd\-analyze calendar \fIEXPRESSION\fR\&.\&.\&."
451 .PP
452 This command will parse and normalize repetitive calendar time events, and will calculate when they elapse next\&. This takes the same input as the
453 \fIOnCalendar=\fR
454 setting in
455 \fBsystemd.timer\fR(5), following the syntax described in
456 \fBsystemd.time\fR(7)\&. By default, only the next time the calendar expression will elapse is shown; use
457 \fB\-\-iterations=\fR
458 to show the specified number of next times the expression elapses\&. Each time the expression elapses forms a timestamp, see the
459 \fBtimestamp\fR
460 verb below\&.
461 .PP
462 \fBExample\ \&13.\ \&Show leap days in the near future\fR
463 .sp
464 .if n \{\
465 .RS 4
466 .\}
467 .nf
468 $ systemd\-analyze calendar \-\-iterations=5 \*(Aq*\-2\-29 0:0:0\*(Aq
469 Original form: *\-2\-29 0:0:0
470 Normalized form: *\-02\-29 00:00:00
471 Next elapse: Sat 2020\-02\-29 00:00:00 UTC
472 From now: 11 months 15 days left
473 Iter\&. #2: Thu 2024\-02\-29 00:00:00 UTC
474 From now: 4 years 11 months left
475 Iter\&. #3: Tue 2028\-02\-29 00:00:00 UTC
476 From now: 8 years 11 months left
477 Iter\&. #4: Sun 2032\-02\-29 00:00:00 UTC
478 From now: 12 years 11 months left
479 Iter\&. #5: Fri 2036\-02\-29 00:00:00 UTC
480 From now: 16 years 11 months left
481 .fi
482 .if n \{\
483 .RE
484 .\}
485 .SS "systemd\-analyze timestamp \fITIMESTAMP\fR\&.\&.\&."
486 .PP
487 This command parses a timestamp (i\&.e\&. a single point in time) and outputs the normalized form and the difference between this timestamp and now\&. The timestamp should adhere to the syntax documented in
488 \fBsystemd.time\fR(7), section "PARSING TIMESTAMPS"\&.
489 .PP
490 \fBExample\ \&14.\ \&Show parsing of timestamps\fR
491 .sp
492 .if n \{\
493 .RS 4
494 .\}
495 .nf
496 $ systemd\-analyze timestamp yesterday now tomorrow
497 Original form: yesterday
498 Normalized form: Mon 2019\-05\-20 00:00:00 CEST
499 (in UTC): Sun 2019\-05\-19 22:00:00 UTC
500 UNIX seconds: @15583032000
501 From now: 1 day 9h ago
502
503 Original form: now
504 Normalized form: Tue 2019\-05\-21 09:48:39 CEST
505 (in UTC): Tue 2019\-05\-21 07:48:39 UTC
506 UNIX seconds: @1558424919\&.659757
507 From now: 43us ago
508
509 Original form: tomorrow
510 Normalized form: Wed 2019\-05\-22 00:00:00 CEST
511 (in UTC): Tue 2019\-05\-21 22:00:00 UTC
512 UNIX seconds: @15584760000
513 From now: 14h left
514 .fi
515 .if n \{\
516 .RE
517 .\}
518 .SS "systemd\-analyze timespan \fIEXPRESSION\fR\&.\&.\&."
519 .PP
520 This command parses a time span (i\&.e\&. a difference between two timestamps) and outputs the normalized form and the equivalent value in microseconds\&. The time span should adhere to the syntax documented in
521 \fBsystemd.time\fR(7), section "PARSING TIME SPANS"\&. Values without units are parsed as seconds\&.
522 .PP
523 \fBExample\ \&15.\ \&Show parsing of timespans\fR
524 .sp
525 .if n \{\
526 .RS 4
527 .\}
528 .nf
529 $ systemd\-analyze timespan 1s 300s \*(Aq1year 0\&.000001s\*(Aq
530 Original: 1s
531 μs: 1000000
532 Human: 1s
533
534 Original: 300s
535 μs: 300000000
536 Human: 5min
537
538 Original: 1year 0\&.000001s
539 μs: 31557600000001
540 Human: 1y 1us
541 .fi
542 .if n \{\
543 .RE
544 .\}
545 .SS "systemd\-analyze cat\-config \fINAME\fR|\fIPATH\fR\&.\&.\&."
546 .PP
547 This command is similar to
548 \fBsystemctl cat\fR, 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\&. Each argument must be either an absolute path including the prefix (such as
549 /etc/systemd/logind\&.conf
550 or
551 /usr/lib/systemd/logind\&.conf), or a name relative to the prefix (such as
552 systemd/logind\&.conf)\&.
553 .PP
554 \fBExample\ \&16.\ \&Showing logind configuration\fR
555 .sp
556 .if n \{\
557 .RS 4
558 .\}
559 .nf
560 $ systemd\-analyze cat\-config systemd/logind\&.conf
561 # /etc/systemd/logind\&.conf
562 \&.\&.\&.
563 [Login]
564 NAutoVTs=8
565 \&.\&.\&.
566
567 # /usr/lib/systemd/logind\&.conf\&.d/20\-test\&.conf
568 \&.\&.\&. some override from another package
569
570 # /etc/systemd/logind\&.conf\&.d/50\-override\&.conf
571 \&.\&.\&. some administrator override
572 .fi
573 .if n \{\
574 .RE
575 .\}
576 .SS "systemd\-analyze compare\-versions \fIVERSION1\fR [\fIOP\fR] \fIVERSION2\fR"
577 .PP
578 This command has two distinct modes of operation, depending on whether the operator
579 \fIOP\fR
580 is specified\&.
581 .PP
582 In the first mode \(em when
583 \fIOP\fR
584 is not specified \(em, it will compare the two version strings and print either
585 "\fIVERSION1\fR < \fIVERSION2\fR", or
586 "\fIVERSION1\fR == \fIVERSION2\fR", or
587 "\fIVERSION1\fR > \fIVERSION2\fR"
588 as appropriate\&.
589 .PP
590 The exit status is
591 \fB0\fR
592 if the versions are equal,
593 \fB11\fR
594 if the version of the right is smaller, and
595 \fB12\fR
596 if the version of the left is smaller\&. (This matches the convention used by
597 \fBrpmdev\-vercmp\fR\&.)
598 .PP
599 In the second mode \(em when
600 \fIOP\fR
601 is specified \(em it will compare the two version strings using the operation
602 \fIOP\fR
603 and return
604 \fB0\fR
605 (success) if they condition is satisfied, and
606 \fB1\fR
607 (failure) otherwise\&.
608 \fBOP\fR
609 may be
610 \fBlt\fR,
611 \fBle\fR,
612 \fBeq\fR,
613 \fBne\fR,
614 \fBge\fR,
615 \fBgt\fR\&. In this mode, no output is printed\&. (This matches the convention used by
616 \fBdpkg\fR(1)
617 \fB\-\-compare\-versions\fR\&.)
618 .PP
619 \fBExample\ \&17.\ \&Compare versions of a package\fR
620 .sp
621 .if n \{\
622 .RS 4
623 .\}
624 .nf
625 $ systemd\-analyze compare\-versions systemd\-250~rc1\&.fc36\&.aarch64 systemd\-251\&.fc36\&.aarch64
626 systemd\-250~rc1\&.fc36\&.aarch64 < systemd\-251\&.fc36\&.aarch64
627 $ echo $?
628 12
629
630 $ systemd\-analyze compare\-versions 1 lt 2; echo $?
631 0
632 $ systemd\-analyze compare\-versions 1 ge 2; echo $?
633 1
634 .fi
635 .if n \{\
636 .RE
637 .\}
638 .SS "systemd\-analyze verify \fIFILE\fR\&.\&.\&."
639 .PP
640 This command will load unit files and print warnings if any errors are detected\&. Files specified on the command line will be loaded, but also any other units referenced by them\&. A unit\*(Aqs name on disk can be overridden by specifying an alias after a colon; see below for an example\&. The full unit search path is formed by combining the directories for all command line arguments, and the usual unit load paths\&. The variable
641 \fI$SYSTEMD_UNIT_PATH\fR
642 is supported, and may be used to replace or augment the compiled in set of unit load paths; see
643 \fBsystemd.unit\fR(5)\&. All units files present in the directories containing the command line arguments will be used in preference to the other paths\&. If a template unit without an instance name is specified (e\&.g\&.
644 foo@\&.service),
645 "test_instance"
646 will be used as the instance name, which can be controlled by
647 \fB\-\-instance=\fR
648 option\&.
649 .PP
650 The following errors are currently detected:
651 .sp
652 .RS 4
653 .ie n \{\
654 \h'-04'\(bu\h'+03'\c
655 .\}
656 .el \{\
657 .sp -1
658 .IP \(bu 2.3
659 .\}
660 unknown sections and directives,
661 .RE
662 .sp
663 .RS 4
664 .ie n \{\
665 \h'-04'\(bu\h'+03'\c
666 .\}
667 .el \{\
668 .sp -1
669 .IP \(bu 2.3
670 .\}
671 missing dependencies which are required to start the given unit,
672 .RE
673 .sp
674 .RS 4
675 .ie n \{\
676 \h'-04'\(bu\h'+03'\c
677 .\}
678 .el \{\
679 .sp -1
680 .IP \(bu 2.3
681 .\}
682 man pages listed in
683 \fIDocumentation=\fR
684 which are not found in the system,
685 .RE
686 .sp
687 .RS 4
688 .ie n \{\
689 \h'-04'\(bu\h'+03'\c
690 .\}
691 .el \{\
692 .sp -1
693 .IP \(bu 2.3
694 .\}
695 commands listed in
696 \fIExecStart=\fR
697 and similar which are not found in the system or not executable\&.
698 .RE
699 .PP
700 \fBExample\ \&18.\ \&Misspelt directives\fR
701 .sp
702 .if n \{\
703 .RS 4
704 .\}
705 .nf
706 $ cat \&./user\&.slice
707 [Unit]
708 WhatIsThis=11
709 Documentation=man:nosuchfile(1)
710 Requires=different\&.service
711
712 [Service]
713 Description=x
714
715 $ systemd\-analyze verify \&./user\&.slice
716 [\&./user\&.slice:9] Unknown lvalue \*(AqWhatIsThis\*(Aq in section \*(AqUnit\*(Aq
717 [\&./user\&.slice:13] Unknown section \*(AqService\*(Aq\&. Ignoring\&.
718 Error: org\&.freedesktop\&.systemd1\&.LoadFailed:
719 Unit different\&.service failed to load:
720 No such file or directory\&.
721 Failed to create user\&.slice/start: Invalid argument
722 user\&.slice: man nosuchfile(1) command failed with code 16
723 .fi
724 .if n \{\
725 .RE
726 .\}
727 .PP
728 \fBExample\ \&19.\ \&Missing service units\fR
729 .sp
730 .if n \{\
731 .RS 4
732 .\}
733 .nf
734 $ tail \&./a\&.socket \&./b\&.socket
735 ==> \&./a\&.socket <==
736 [Socket]
737 ListenStream=100
738
739 ==> \&./b\&.socket <==
740 [Socket]
741 ListenStream=100
742 Accept=yes
743
744 $ systemd\-analyze verify \&./a\&.socket \&./b\&.socket
745 Service a\&.service not loaded, a\&.socket cannot be started\&.
746 Service b@0\&.service not loaded, b\&.socket cannot be started\&.
747 .fi
748 .if n \{\
749 .RE
750 .\}
751 .PP
752 \fBExample\ \&20.\ \&Aliasing a unit\fR
753 .sp
754 .if n \{\
755 .RS 4
756 .\}
757 .nf
758 $ cat /tmp/source
759 [Unit]
760 Description=Hostname printer
761
762 [Service]
763 Type=simple
764 ExecStart=/usr/bin/echo %H
765 MysteryKey=true
766
767 $ systemd\-analyze verify /tmp/source
768 Failed to prepare filename /tmp/source: Invalid argument
769
770 $ systemd\-analyze verify /tmp/source:alias\&.service
771 alias\&.service:7: Unknown key name \*(AqMysteryKey\*(Aq in section \*(AqService\*(Aq, ignoring\&.
772 .fi
773 .if n \{\
774 .RE
775 .\}
776 .SS "systemd\-analyze security [\fIUNIT\fR\&.\&.\&.]"
777 .PP
778 This command analyzes the security and sandboxing settings of one or more specified service units\&. If at least one unit name is specified the security settings of the specified service units are inspected and a detailed analysis is shown\&. If no unit name is specified, all currently loaded, long\-running service units are inspected and a terse table with results shown\&. The command checks for various security\-related service settings, assigning each a numeric "exposure level" value, depending on how important a setting is\&. It then calculates an overall exposure level for the whole unit, which is an estimation in the range 0\&.0\&...10\&.0 indicating how exposed a service is security\-wise\&. High exposure levels indicate very little applied sandboxing\&. Low exposure levels indicate tight sandboxing and strongest security restrictions\&. Note that this only analyzes the per\-service security features systemd itself implements\&. This means that any additional security mechanisms applied by the service code itself are not accounted for\&. The exposure level determined this way should not be misunderstood: a high exposure level neither means that there is no effective sandboxing applied by the service code itself, nor that the service is actually vulnerable to remote or local attacks\&. High exposure levels do indicate however that most likely the service might benefit from additional settings applied to them\&.
779 .PP
780 Please note that many of the security and sandboxing settings individually can be circumvented \(em unless combined with others\&. For example, if a service retains the privilege to establish or undo mount points many of the sandboxing options can be undone by the service code itself\&. Due to that is essential that each service uses the most comprehensive and strict sandboxing and security settings possible\&. The tool will take into account some of these combinations and relationships between the settings, but not all\&. Also note that the security and sandboxing settings analyzed here only apply to the operations executed by the service code itself\&. If a service has access to an IPC system (such as D\-Bus) it might request operations from other services that are not subject to the same restrictions\&. Any comprehensive security and sandboxing analysis is hence incomplete if the IPC access policy is not validated too\&.
781 .PP
782 \fBExample\ \&21.\ \&Analyze systemd\-logind\&.service\fR
783 .sp
784 .if n \{\
785 .RS 4
786 .\}
787 .nf
788 $ systemd\-analyze security \-\-no\-pager systemd\-logind\&.service
789 NAME DESCRIPTION EXPOSURE
790 ✗ PrivateNetwork= Service has access to the host\*(Aqs network 0\&.5
791 ✗ User=/DynamicUser= Service runs as root user 0\&.4
792 ✗ DeviceAllow= Service has no device ACL 0\&.2
793 ✓ IPAddressDeny= Service blocks all IP address ranges
794 \&.\&.\&.
795 → Overall exposure level for systemd\-logind\&.service: 4\&.1 OK 🙂
796 .fi
797 .if n \{\
798 .RE
799 .\}
800 .SS "systemd\-analyze inspect\-elf \fIFILE\fR\&.\&.\&."
801 .PP
802 This command will load the specified files, and if they are ELF objects (executables, libraries, core files, etc\&.) it will parse the embedded packaging metadata, if any, and print it in a table or json format\&. See the
803 \m[blue]\fBPackage Metadata for Executable Files\fR\m[]\&\s-2\u[1]\d\s+2
804 document for more information\&.
805 .PP
806 \fBExample\ \&22.\ \&Print information about a core file as JSON\fR
807 .sp
808 .if n \{\
809 .RS 4
810 .\}
811 .nf
812 $ systemd\-analyze inspect\-elf \-\-json=pretty \e
813 core\&.fsverity\&.1000\&.f77dac5dc161402aa44e15b7dd9dcf97\&.58561\&.1637106137000000
814 {
815 "elfType" : "coredump",
816 "elfArchitecture" : "AMD x86\-64",
817 "/home/bluca/git/fsverity\-utils/fsverity" : {
818 "type" : "deb",
819 "name" : "fsverity\-utils",
820 "version" : "1\&.3\-1",
821 "buildId" : "7c895ecd2a271f93e96268f479fdc3c64a2ec4ee"
822 },
823 "/home/bluca/git/fsverity\-utils/libfsverity\&.so\&.0" : {
824 "type" : "deb",
825 "name" : "fsverity\-utils",
826 "version" : "1\&.3\-1",
827 "buildId" : "b5e428254abf14237b0ae70ed85fffbb98a78f88"
828 }
829 }
830 .fi
831 .if n \{\
832 .RE
833 .\}
834 .SS "systemd\-analyze fdstore \fIUNIT\fR\&.\&.\&."
835 .PP
836 Lists the current contents of the specified service unit\*(Aqs file descriptor store\&. This shows names, inode types, device numbers, inode numbers, paths and open modes of the open file descriptors\&. The specified units must have
837 \fIFileDescriptorStoreMax=\fR
838 enabled, see
839 \fBsystemd.service\fR(5)
840 for details\&.
841 .PP
842 \fBExample\ \&23.\ \&Table output\fR
843 .sp
844 .if n \{\
845 .RS 4
846 .\}
847 .nf
848 $ systemd\-analyze fdstore systemd\-journald\&.service
849 FDNAME TYPE DEVNO INODE RDEVNO PATH FLAGS
850 stored sock 0:8 4218620 \- socket:[4218620] ro
851 stored sock 0:8 4213198 \- socket:[4213198] ro
852 stored sock 0:8 4213190 \- socket:[4213190] ro
853 \&...
854 .fi
855 .if n \{\
856 .RE
857 .\}
858 .PP
859 Note: the "DEVNO" column refers to the major/minor numbers of the device node backing the file system the file descriptor\*(Aqs inode is on\&. The "RDEVNO" column refers to the major/minor numbers of the device node itself if the file descriptor refers to one\&. Compare with corresponding
860 \fI\&.st_dev\fR
861 and
862 \fI\&.st_rdev\fR
863 fields in
864 \fBstruct stat\fR
865 (see
866 \fBstat\fR(2)
867 for details)\&. The listed inode numbers in the "INODE" column are on the file system indicated by "DEVNO"\&.
868 .SS "systemd\-analyze image\-policy \fIPOLICY\fR\&..."
869 .PP
870 This command analyzes the specified image policy string, as per
871 \fBsystemd.image-policy\fR(7)\&. The policy is normalized and simplified\&. For each currently defined partition identifier (as per the
872 \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[2]\d\s+2) the effect of the image policy string is shown in tabular form\&.
873 .PP
874 \fBExample\ \&24.\ \&Example Output\fR
875 .sp
876 .if n \{\
877 .RS 4
878 .\}
879 .nf
880 $ systemd\-analyze image\-policy swap=encrypted:usr=read\-only\-on+verity:root=encrypted
881 Analyzing policy: root=encrypted:usr=verity+read\-only\-on:swap=encrypted
882 Long form: root=encrypted:usr=verity+read\-only\-on:swap=encrypted:=unused+absent
883
884 PARTITION MODE READ\-ONLY GROWFS
885 root encrypted \- \-
886 usr verity yes \-
887 home ignore \- \-
888 srv ignore \- \-
889 esp ignore \- \-
890 xbootldr ignore \- \-
891 swap encrypted \- \-
892 root\-verity ignore \- \-
893 usr\-verity unprotected yes \-
894 root\-verity\-sig ignore \- \-
895 usr\-verity\-sig ignore \- \-
896 tmp ignore \- \-
897 var ignore \- \-
898 default ignore \- \-
899 .fi
900 .if n \{\
901 .RE
902 .\}
903 .SS "systemd\-analyze has\-tpm2"
904 .PP
905 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
906 "yes"
907 and exits with exit status zero\&. If no such device is discovered/supported/used, prints
908 "no"\&. Otherwise, prints
909 "partial"\&. 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
910 libtss2\-esys\&.so\&.0,
911 libtss2\-rc\&.so\&.0, and
912 libtss2\-mu\&.so\&.0\&. The requirement may be changed in the future release\&.
913 .PP
914 Note, this checks for TPM 2\&.0 devices only, and does not consider TPM 1\&.2 at all\&.
915 .PP
916 Combine with
917 \fB\-\-quiet\fR
918 to suppress the output\&.
919 .PP
920 \fBExample\ \&25.\ \&Example Output\fR
921 .sp
922 .if n \{\
923 .RS 4
924 .\}
925 .nf
926 yes
927 +firmware
928 +driver
929 +system
930 +subsystem
931 +libraries
932 +libtss2\-esys\&.so\&.0
933 +libtss2\-rc\&.so\&.0
934 +libtss2\-mu\&.so\&.0
935 .fi
936 .if n \{\
937 .RE
938 .\}
939 .PP
940 Added in version 257\&.
941 .SS "systemd\-analyze pcrs [\fIPCR\fR\&...]"
942 .PP
943 This command shows the known TPM2 PCRs along with their identifying names and current values\&.
944 .PP
945 \fBExample\ \&26.\ \&Example Output\fR
946 .sp
947 .if n \{\
948 .RS 4
949 .\}
950 .nf
951 $ systemd\-analyze pcrs
952 NR NAME SHA256
953 0 platform\-code bcd2eb527108bbb1f5528409bcbe310aa9b74f687854cc5857605993f3d9eb11
954 1 platform\-config b60622856eb7ce52637b80f30a520e6e87c347daa679f3335f4f1a600681bb01
955 2 external\-code 1471262403e9a62f9c392941300b4807fbdb6f0bfdd50abfab752732087017dd
956 3 external\-config 3d458cfe55cc03ea1f443f1562beec8df51c75e14a9fcf9a7234a13f198e7969
957 4 boot\-loader\-code 939f7fa1458e1f7ce968874d908e524fc0debf890383d355e4ce347b7b78a95c
958 5 boot\-loader\-config 864c61c5ea5ecbdb6951e6cb6d9c1f4b4eac79772f7fe13b8bece569d83d3768
959 6 \- 3d458cfe55cc03ea1f443f1562beec8df51c75e14a9fcf9a7234a13f198e7969
960 7 secure\-boot\-policy 9c905bd9b9891bfb889b90a54c4b537b889cfa817c4389cc25754823a9443255
961 8 \- 0000000000000000000000000000000000000000000000000000000000000000
962 9 kernel\-initrd 9caa29b128113ef42aa53d421f03437be57211e5ebafc0fa8b5d4514ee37ff0c
963 10 ima 5ea9e3dab53eb6b483b6ec9e3b2c712bea66bca1b155637841216e0094387400
964 11 kernel\-boot 0000000000000000000000000000000000000000000000000000000000000000
965 12 kernel\-config 627ffa4b405e911902fe1f1a8b0164693b31acab04f805f15bccfe2209c7eace
966 13 sysexts 0000000000000000000000000000000000000000000000000000000000000000
967 14 shim\-policy 0000000000000000000000000000000000000000000000000000000000000000
968 15 system\-identity 0000000000000000000000000000000000000000000000000000000000000000
969 16 debug 0000000000000000000000000000000000000000000000000000000000000000
970 17 \- ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
971 18 \- ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
972 19 \- ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
973 20 \- ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
974 21 \- ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
975 22 \- ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
976 23 application\-support 0000000000000000000000000000000000000000000000000000000000000000
977 .fi
978 .if n \{\
979 .RE
980 .\}
981 .SS "systemd\-analyze srk [>\fIFILE\fR]"
982 .PP
983 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\&.
984 .PP
985 \fBExample\ \&27.\ \&Save the Storage Root Key to srk\&.tpm2b_public\fR
986 .sp
987 .if n \{\
988 .RS 4
989 .\}
990 .nf
991 systemd\-analyze srk >srk\&.tpm2b_public
992 .fi
993 .if n \{\
994 .RE
995 .\}
996 .SS "systemd\-analyze architectures [\fINAME\fR\&.\&.\&.]"
997 .PP
998 Lists all known CPU architectures, and which ones are native\&. The listed architecture names are those
999 \fIConditionArchitecture=\fR
1000 supports, see
1001 \fBsystemd.unit\fR(5)
1002 for details\&. If architecture names are specified only those specified are listed\&.
1003 .PP
1004 \fBExample\ \&28.\ \&Table output\fR
1005 .sp
1006 .if n \{\
1007 .RS 4
1008 .\}
1009 .nf
1010 $ systemd\-analyze architectures
1011 NAME SUPPORT
1012 alpha foreign
1013 arc foreign
1014 arc\-be foreign
1015 arm foreign
1016 arm64 foreign
1017 \&...
1018 sparc foreign
1019 sparc64 foreign
1020 tilegx foreign
1021 x86 secondary
1022 x86\-64 native
1023 .fi
1024 .if n \{\
1025 .RE
1026 .\}
1027 .SS "systemd\-analyze smbios11"
1028 .PP
1029 Shows a list of SMBIOS Type #11 strings passed to the system\&. Also see
1030 \fBsmbios-type-11\fR(7)\&.
1031 .PP
1032 \fBExample\ \&29.\ \&Example output\fR
1033 .sp
1034 .if n \{\
1035 .RS 4
1036 .\}
1037 .nf
1038 $ systemd\-analyze smbios11
1039 io\&.systemd\&.stub\&.kernel\-cmdline\-extra=console=ttyS0
1040 io\&.systemd\&.credential\&.binary:ssh\&.ephemeral\-authorized_keys\-all=c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSURGd20xbFp4WlRGclJteG9ZQlozOTYzcE1uYlJCaDMwM1MxVXhLSUM2NmYgbGVubmFydEB6ZXRhCg==
1041 io\&.systemd\&.credential:vmm\&.notify_socket=vsock\-stream:2:254570042
1042
1043 3 SMBIOS Type #11 strings passed\&.
1044 .fi
1045 .if n \{\
1046 .RE
1047 .\}
1048 .PP
1049 Added in version 257\&.
1050 .SS "systemd\-analyze chid"
1051 .PP
1052 Shows a list of Computer Hardware IDs (CHIDs) of the local system\&. These IDs identify the system\*(Aqs computer hardware, based on SMBIOS data\&. See
1053 \m[blue]\fBUsing Computer Hardware IDs (CHIDs)\fR\m[]\&\s-2\u[3]\d\s+2
1054 for details about CHIDs\&.
1055 .PP
1056 \fBExample\ \&30.\ \&Example output\fR
1057 .sp
1058 .if n \{\
1059 .RS 4
1060 .\}
1061 .nf
1062 $ systemd\-analyze chid
1063 TYPE INPUT CHID
1064 3 MFPSmp 520537c0\-3b59\-504f\-b062\-9682ea236b21
1065 4 MFPS\-\- edf05dc8\-a53d\-5b2c\-8023\-630bca2a2463
1066 5 MFP\-\-\- ebc6a4d9\-ec48\-537a\-916b\-c69fa4fdd814
1067 6 M\-\-Smp 5ebe4bba\-f598\-5e90\-9ff2\-9fd0d3211465
1068 7 M\-\-S\-\- 1a3fb835\-b42a\-5f9c\-a38c\-eff5bfd5c41d
1069 8 M\-P\-mp 2a831dce\-8163\-5bad\-8406\-435b8c752dd8
1070 9 M\-P\-\-\- 7c21c878\-4a75\-50f7\-9816\-21e811588da0
1071 10 MF\-\-mp 9a003537\-bcc5\-500e\-b10a\-8d8892e4fc64
1072 11 MF\-\-\-\- bb9122bb\-8a5c\-50d2\-a742\-a85beb719909
1073 13 M\-\-\-mp bfc36935\-5032\-5987\-a0a3\-6311f01de33a
1074
1075 LEGEND: M → sys_vendor (LENOVO) ┄ F → product_family (ThinkPad X1 Carbon Gen 9) ┄ P → product_name (20XW0055GE)
1076 S → product_sku (LENOVO_MT_20XW_BU_Think_FM_ThinkPad X1 Carbon Gen 9) ┄ m → board_vendor (LENOVO)
1077 p → board_name (20XW0055GE)
1078 .fi
1079 .if n \{\
1080 .RE
1081 .\}
1082 .PP
1083 Added in version 258\&.
1084 .SS "systemd\-analyze transient\-settings \fITYPE\fR\&.\&.\&."
1085 .PP
1086 Lists properties that can be set for various unit types via command line interfaces, in particular
1087 \fBsystemctl\fR(1)
1088 \fBset\-property\fR
1089 and
1090 \fB\-\-property=\fR/\fB\-\-automount\-property=\fR
1091 options in
1092 \fBsystemd-run\fR(1),
1093 \fBsystemd-nspawn\fR(1), and
1094 \fBsystemd-mount\fR(1)\&. Those assignments are possible for a subset of the properties that can be set in config files, see
1095 \fBsystemd.unit\fR(5),
1096 \fBsystemd.exec\fR(5),
1097 \fBsystemd.resource-control\fR(5), and the other unit\-type\-specific pages\&. The
1098 \fITYPE\fR
1099 argument must be a unit type ("service", "socket", \&...)\&. The properties that apply to the specific types are listed\&.
1100 .PP
1101 Note: D\-Bus properties documented in
1102 \fBorg.freedesktop.systemd1\fR(5)
1103 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,
1104 \fILogRateLimitIntervalSec=\fR
1105 is described in
1106 \fBsystemd.exec\fR(5)
1107 and would be listed by this command, but the corresponding D\-Bus property described in
1108 \fBsystemd.exec\fR(5)
1109 is
1110 \fILogRateLimitIntervalUSec\fR\&.
1111 .PP
1112 This verb is intended primarily for programmatic generation of shell completions\&.
1113 .PP
1114 Added in version 258\&.
1115 .SS "systemd\-analyze unit\-shell \fISERVICE\fR [\fIcommand\fR\&.\&.\&.]"
1116 .PP
1117 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\&.
1118 .PP
1119 \fBExample\ \&31.\ \&Example output\fR
1120 .sp
1121 .if n \{\
1122 .RS 4
1123 .\}
1124 .nf
1125 $ systemd\-analyze unit\-shell systemd\-resolved\&.service ls
1126 bin dev etc home lib lib64 lost+found mnt proc run srv tmp var vmlinuz\&.old
1127 boot efi exitrd init lib32 libx32 media opt root sbin sys usr vmlinuz work
1128 .fi
1129 .if n \{\
1130 .RE
1131 .\}
1132 .PP
1133 Added in version 258\&.
1134 .SS "systemd\-analyze unit\-gdb \fISERVICE\fR"
1135 .PP
1136 Spawn and attach a debugger to the given service\&. By default,
1137 \fBgdb\fR(1)
1138 will be used\&. This may be changed using the
1139 \fB\-\-debugger=\fR
1140 option or the
1141 \fI$SYSTEMD_DEBUGGER\fR
1142 environment variable\&. Use the
1143 \fB\-\-debugger\-arguments=\fR
1144 option to pass extra command line arguments to the debugger and quote as appropriate when
1145 \fIARGS\fR
1146 contain whitespace (See Example)\&.
1147 .PP
1148 \fBExample\ \&32.\ \&\fR
1149 .sp
1150 .if n \{\
1151 .RS 4
1152 .\}
1153 .nf
1154 $ systemd\-analyze \-\-debugger\-arguments="\-batch \-ex \*(Aqinfo all\-registers\*(Aq" unit\-gdb systemd\-oomd\&.service
1155 .fi
1156 .if n \{\
1157 .RE
1158 .\}
1159 .PP
1160 Added in version 258\&.
1161 .SH "OPTIONS"
1162 .PP
1163 The following options are understood:
1164 .PP
1165 \fB\-\-system\fR
1166 .RS 4
1167 Operates on the system systemd instance\&. This is the implied default\&.
1168 .sp
1169 Added in version 209\&.
1170 .RE
1171 .PP
1172 \fB\-\-user\fR
1173 .RS 4
1174 Operates on the user systemd instance\&.
1175 .sp
1176 Added in version 186\&.
1177 .RE
1178 .PP
1179 \fB\-\-global\fR
1180 .RS 4
1181 Operates on the system\-wide configuration for user systemd instance\&.
1182 .sp
1183 Added in version 238\&.
1184 .RE
1185 .PP
1186 \fB\-\-order\fR, \fB\-\-require\fR
1187 .RS 4
1188 When used in conjunction with the
1189 \fBdot\fR
1190 command (see above), selects which dependencies are shown in the dependency graph\&. If
1191 \fB\-\-order\fR
1192 is passed, only dependencies of type
1193 \fIAfter=\fR
1194 or
1195 \fIBefore=\fR
1196 are shown\&. If
1197 \fB\-\-require\fR
1198 is passed, only dependencies of type
1199 \fIRequires=\fR,
1200 \fIRequisite=\fR,
1201 \fIBindsTo=\fR,
1202 \fIWants=\fR, and
1203 \fIConflicts=\fR
1204 are shown\&. If neither is passed, this shows dependencies of all these types\&.
1205 .sp
1206 Added in version 198\&.
1207 .RE
1208 .PP
1209 \fB\-\-from\-pattern=\fR, \fB\-\-to\-pattern=\fR
1210 .RS 4
1211 When used in conjunction with the
1212 \fBdot\fR
1213 command (see above), this selects which relationships are shown in the dependency graph\&. Both options require a
1214 \fBglob\fR(7)
1215 pattern as an argument, which will be matched against the left\-hand and the right\-hand, respectively, nodes of a relationship\&.
1216 .sp
1217 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\&.
1218 .sp
1219 Added in version 201\&.
1220 .RE
1221 .PP
1222 \fB\-\-fuzz=\fR\fB\fItimespan\fR\fR
1223 .RS 4
1224 When used in conjunction with the
1225 \fBcritical\-chain\fR
1226 command (see above), also show units, which finished
1227 \fItimespan\fR
1228 earlier, than the latest unit in the same level\&. The unit of
1229 \fItimespan\fR
1230 is seconds unless specified with a different unit, e\&.g\&. "50ms"\&.
1231 .sp
1232 Added in version 203\&.
1233 .RE
1234 .PP
1235 \fB\-\-man=no\fR
1236 .RS 4
1237 Do not invoke
1238 \fBman\fR(1)
1239 to verify the existence of man pages listed in
1240 \fIDocumentation=\fR\&.
1241 .sp
1242 Added in version 235\&.
1243 .RE
1244 .PP
1245 \fB\-\-generators\fR
1246 .RS 4
1247 Invoke unit generators, see
1248 \fBsystemd.generator\fR(7)\&. Some generators require root privileges\&. Under a normal user, running with generators enabled will generally result in some warnings\&.
1249 .sp
1250 Added in version 235\&.
1251 .RE
1252 .PP
1253 \fB\-\-instance=NAME\fR
1254 .RS 4
1255 Specifies fallback instance name for template units\&. This will be used when one or more template units without an instance name (e\&.g\&.
1256 foo@\&.service) specified for
1257 \fBsystemd\-analyze condition\fR
1258 with
1259 \fB\-\-unit=\fR,
1260 \fBsystemd\-analyze security\fR, and
1261 \fBsystemd\-analyze verify\fR\&. If unspecified,
1262 "test_instance"
1263 will be used\&.
1264 .sp
1265 Added in version 257\&.
1266 .RE
1267 .PP
1268 \fB\-\-recursive\-errors=\fR\fB\fIMODE\fR\fR
1269 .RS 4
1270 Control verification of units and their dependencies and whether
1271 \fBsystemd\-analyze verify\fR
1272 exits with a non\-zero process exit status or not\&. With
1273 \fByes\fR, return a non\-zero process exit status when warnings arise during verification of either the specified unit or any of its associated dependencies\&. With
1274 \fBno\fR, return a non\-zero process exit status when warnings arise during verification of only the specified unit\&. With
1275 \fBone\fR, 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\&.
1276 .sp
1277 Added in version 250\&.
1278 .RE
1279 .PP
1280 \fB\-\-root=\fR\fB\fIPATH\fR\fR
1281 .RS 4
1282 With
1283 \fBcat\-config\fR,
1284 \fBverify\fR,
1285 \fBcondition\fR,
1286 \fBunit\-gdb\fR, and
1287 \fBsecurity\fR
1288 when used with
1289 \fB\-\-offline=\fR, operate on files underneath the specified root path
1290 \fIPATH\fR\&.
1291 .sp
1292 Added in version 239\&.
1293 .RE
1294 .PP
1295 \fB\-\-image=\fR\fB\fIPATH\fR\fR
1296 .RS 4
1297 With
1298 \fBcat\-config\fR,
1299 \fBverify\fR,
1300 \fBcondition\fR
1301 and
1302 \fBsecurity\fR
1303 when used with
1304 \fB\-\-offline=\fR, operate on files inside the specified image path
1305 \fIPATH\fR\&.
1306 .sp
1307 Added in version 250\&.
1308 .RE
1309 .PP
1310 \fB\-\-image\-policy=\fR\fB\fIpolicy\fR\fR
1311 .RS 4
1312 Takes an image policy string as argument, as per
1313 \fBsystemd.image-policy\fR(7)\&. The policy is enforced when operating on the disk image specified via
1314 \fB\-\-image=\fR, see above\&. If not specified, defaults to the
1315 "*"
1316 policy, i\&.e\&. all recognized file systems in the image are used\&.
1317 .RE
1318 .PP
1319 \fB\-\-offline=\fR\fB\fIBOOL\fR\fR
1320 .RS 4
1321 With
1322 \fBsecurity\fR, 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
1323 \fBsecurity\fR
1324 verb when used by itself does\&. This means that
1325 \fB\-\-offline=\fR
1326 can be used with
1327 \fB\-\-root=\fR
1328 and
1329 \fB\-\-image=\fR
1330 as well\&. If a unit\*(Aqs overall exposure level is above that set by
1331 \fB\-\-threshold=\fR
1332 (default value is 100),
1333 \fB\-\-offline=\fR
1334 will return an error\&.
1335 .sp
1336 Added in version 250\&.
1337 .RE
1338 .PP
1339 \fB\-\-profile=\fR\fB\fIPATH\fR\fR
1340 .RS 4
1341 With
1342 \fBsecurity\fR
1343 \fB\-\-offline=\fR, 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\&.
1344 .sp
1345 Added in version 250\&.
1346 .RE
1347 .PP
1348 \fB\-\-threshold=\fR\fB\fINUMBER\fR\fR
1349 .RS 4
1350 With
1351 \fBsecurity\fR, allow the user to set a custom value to compare the overall exposure level with, for the specified unit files\&. If a unit\*(Aqs overall exposure level, is greater than that set by the user,
1352 \fBsecurity\fR
1353 will return an error\&.
1354 \fB\-\-threshold=\fR
1355 can be used with
1356 \fB\-\-offline=\fR
1357 as well and its default value is 100\&.
1358 .sp
1359 Added in version 250\&.
1360 .RE
1361 .PP
1362 \fB\-\-security\-policy=\fR\fB\fIPATH\fR\fR
1363 .RS 4
1364 With
1365 \fBsecurity\fR, 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\&.
1366 .sp
1367 .it 1 an-trap
1368 .nr an-no-space-flag 1
1369 .nr an-break-flag 1
1370 .br
1371 .B Table\ \&1.\ \&Accepted Assessment Test Identifiers
1372 .TS
1373 allbox tab(:);
1374 lB.
1375 T{
1376 Assessment Test Identifier
1377 T}
1378 .T&
1379 l
1380 l
1381 l
1382 l
1383 l
1384 l
1385 l
1386 l
1387 l
1388 l
1389 l
1390 l
1391 l
1392 l
1393 l
1394 l
1395 l
1396 l
1397 l
1398 l
1399 l
1400 l
1401 l
1402 l
1403 l
1404 l
1405 l
1406 l
1407 l
1408 l
1409 l
1410 l
1411 l
1412 l
1413 l
1414 l
1415 l
1416 l
1417 l
1418 l
1419 l
1420 l
1421 l
1422 l
1423 l
1424 l
1425 l
1426 l
1427 l
1428 l
1429 l
1430 l
1431 l
1432 l
1433 l
1434 l
1435 l
1436 l
1437 l
1438 l
1439 l
1440 l
1441 l
1442 l
1443 l
1444 l
1445 l
1446 l
1447 l
1448 l
1449 l
1450 l
1451 l
1452 l
1453 l
1454 l
1455 l
1456 l
1457 l
1458 l.
1459 T{
1460 UserOrDynamicUser
1461 T}
1462 T{
1463 SupplementaryGroups
1464 T}
1465 T{
1466 PrivateMounts
1467 T}
1468 T{
1469 PrivateDevices
1470 T}
1471 T{
1472 PrivateTmp
1473 T}
1474 T{
1475 PrivateNetwork
1476 T}
1477 T{
1478 PrivateUsers
1479 T}
1480 T{
1481 ProtectControlGroups
1482 T}
1483 T{
1484 ProtectKernelModules
1485 T}
1486 T{
1487 ProtectKernelTunables
1488 T}
1489 T{
1490 ProtectKernelLogs
1491 T}
1492 T{
1493 ProtectClock
1494 T}
1495 T{
1496 ProtectHome
1497 T}
1498 T{
1499 ProtectHostname
1500 T}
1501 T{
1502 ProtectSystem
1503 T}
1504 T{
1505 RootDirectoryOrRootImage
1506 T}
1507 T{
1508 LockPersonality
1509 T}
1510 T{
1511 MemoryDenyWriteExecute
1512 T}
1513 T{
1514 NoNewPrivileges
1515 T}
1516 T{
1517 CapabilityBoundingSet_CAP_SYS_ADMIN
1518 T}
1519 T{
1520 CapabilityBoundingSet_CAP_SET_UID_GID_PCAP
1521 T}
1522 T{
1523 CapabilityBoundingSet_CAP_SYS_PTRACE
1524 T}
1525 T{
1526 CapabilityBoundingSet_CAP_SYS_TIME
1527 T}
1528 T{
1529 CapabilityBoundingSet_CAP_NET_ADMIN
1530 T}
1531 T{
1532 CapabilityBoundingSet_CAP_SYS_RAWIO
1533 T}
1534 T{
1535 CapabilityBoundingSet_CAP_SYS_MODULE
1536 T}
1537 T{
1538 CapabilityBoundingSet_CAP_AUDIT
1539 T}
1540 T{
1541 CapabilityBoundingSet_CAP_SYSLOG
1542 T}
1543 T{
1544 CapabilityBoundingSet_CAP_SYS_NICE_RESOURCE
1545 T}
1546 T{
1547 CapabilityBoundingSet_CAP_MKNOD
1548 T}
1549 T{
1550 CapabilityBoundingSet_CAP_CHOWN_FSETID_SETFCAP
1551 T}
1552 T{
1553 CapabilityBoundingSet_CAP_DAC_FOWNER_IPC_OWNER
1554 T}
1555 T{
1556 CapabilityBoundingSet_CAP_KILL
1557 T}
1558 T{
1559 CapabilityBoundingSet_CAP_NET_BIND_SERVICE_BROADCAST_RAW
1560 T}
1561 T{
1562 CapabilityBoundingSet_CAP_SYS_BOOT
1563 T}
1564 T{
1565 CapabilityBoundingSet_CAP_MAC
1566 T}
1567 T{
1568 CapabilityBoundingSet_CAP_LINUX_IMMUTABLE
1569 T}
1570 T{
1571 CapabilityBoundingSet_CAP_IPC_LOCK
1572 T}
1573 T{
1574 CapabilityBoundingSet_CAP_SYS_CHROOT
1575 T}
1576 T{
1577 CapabilityBoundingSet_CAP_BLOCK_SUSPEND
1578 T}
1579 T{
1580 CapabilityBoundingSet_CAP_WAKE_ALARM
1581 T}
1582 T{
1583 CapabilityBoundingSet_CAP_LEASE
1584 T}
1585 T{
1586 CapabilityBoundingSet_CAP_SYS_TTY_CONFIG
1587 T}
1588 T{
1589 CapabilityBoundingSet_CAP_BPF
1590 T}
1591 T{
1592 UMask
1593 T}
1594 T{
1595 KeyringMode
1596 T}
1597 T{
1598 ProtectProc
1599 T}
1600 T{
1601 ProcSubset
1602 T}
1603 T{
1604 NotifyAccess
1605 T}
1606 T{
1607 RemoveIPC
1608 T}
1609 T{
1610 Delegate
1611 T}
1612 T{
1613 RestrictRealtime
1614 T}
1615 T{
1616 RestrictSUIDSGID
1617 T}
1618 T{
1619 RestrictNamespaces_user
1620 T}
1621 T{
1622 RestrictNamespaces_mnt
1623 T}
1624 T{
1625 RestrictNamespaces_ipc
1626 T}
1627 T{
1628 RestrictNamespaces_pid
1629 T}
1630 T{
1631 RestrictNamespaces_cgroup
1632 T}
1633 T{
1634 RestrictNamespaces_uts
1635 T}
1636 T{
1637 RestrictNamespaces_net
1638 T}
1639 T{
1640 RestrictAddressFamilies_AF_INET_INET6
1641 T}
1642 T{
1643 RestrictAddressFamilies_AF_UNIX
1644 T}
1645 T{
1646 RestrictAddressFamilies_AF_NETLINK
1647 T}
1648 T{
1649 RestrictAddressFamilies_AF_PACKET
1650 T}
1651 T{
1652 RestrictAddressFamilies_OTHER
1653 T}
1654 T{
1655 SystemCallArchitectures
1656 T}
1657 T{
1658 SystemCallFilter_swap
1659 T}
1660 T{
1661 SystemCallFilter_obsolete
1662 T}
1663 T{
1664 SystemCallFilter_clock
1665 T}
1666 T{
1667 SystemCallFilter_cpu_emulation
1668 T}
1669 T{
1670 SystemCallFilter_debug
1671 T}
1672 T{
1673 SystemCallFilter_mount
1674 T}
1675 T{
1676 SystemCallFilter_module
1677 T}
1678 T{
1679 SystemCallFilter_raw_io
1680 T}
1681 T{
1682 SystemCallFilter_reboot
1683 T}
1684 T{
1685 SystemCallFilter_privileged
1686 T}
1687 T{
1688 SystemCallFilter_resources
1689 T}
1690 T{
1691 IPAddressDeny
1692 T}
1693 T{
1694 DeviceAllow
1695 T}
1696 T{
1697 AmbientCapabilities
1698 T}
1699 .TE
1700 .sp 1
1701 See example "JSON Policy" below\&.
1702 .sp
1703 Added in version 250\&.
1704 .RE
1705 .PP
1706 \fB\-\-json=\fR\fB\fIMODE\fR\fR
1707 .RS 4
1708 With the
1709 \fBsecurity\fR
1710 command, generate a JSON formatted output of the security analysis table\&. The format is a JSON array with objects containing the following fields:
1711 \fIset\fR
1712 which indicates if the setting has been enabled or not,
1713 \fIname\fR
1714 which is what is used to refer to the setting,
1715 \fIjson_field\fR
1716 which is the JSON compatible identifier of the setting,
1717 \fIdescription\fR
1718 which is an outline of the setting state, and
1719 \fIexposure\fR
1720 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
1721 \fIMODE\fR
1722 passed to the option can be one of three:
1723 \fBoff\fR
1724 which is the default,
1725 \fBpretty\fR
1726 and
1727 \fBshort\fR
1728 which respectively output a prettified or shorted JSON version of the security table\&. With the
1729 \fBplot\fR
1730 command, generate a JSON formatted output of the raw time data\&. The format is a JSON array with objects containing the following fields:
1731 \fIname\fR
1732 which is the unit name,
1733 \fIactivated\fR
1734 which is the time after startup the service was activated,
1735 \fIactivating\fR
1736 which is how long after startup the service was initially started,
1737 \fItime\fR
1738 which is how long the service took to activate from when it was initially started,
1739 \fIdeactivated\fR
1740 which is the time after startup that the service was deactivated,
1741 \fIdeactivating\fR
1742 which is the time after startup that the service was initially told to deactivate\&.
1743 .sp
1744 Added in version 250\&.
1745 .RE
1746 .PP
1747 \fB\-\-iterations=\fR\fB\fINUMBER\fR\fR
1748 .RS 4
1749 When used with the
1750 \fBcalendar\fR
1751 command, show the specified number of iterations the specified calendar expression will elapse next\&. Defaults to 1\&.
1752 .sp
1753 Added in version 242\&.
1754 .RE
1755 .PP
1756 \fB\-\-base\-time=\fR\fB\fITIMESTAMP\fR\fR
1757 .RS 4
1758 When used with the
1759 \fBcalendar\fR
1760 command, show next iterations relative to the specified point in time\&. If not specified, defaults to the current time\&.
1761 .sp
1762 Added in version 244\&.
1763 .RE
1764 .PP
1765 \fB\-\-unit=\fR\fB\fIUNIT\fR\fR
1766 .RS 4
1767 When used with the
1768 \fBcondition\fR
1769 command, evaluate all the
1770 \fICondition*=\&.\&.\&.\fR
1771 and
1772 \fIAssert*=\&.\&.\&.\fR
1773 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
1774 \fI$SYSTEMD_UNIT_PATH\fR
1775 is supported, and may be used to replace or augment the compiled in set of unit load paths; see
1776 \fBsystemd.unit\fR(5)\&. 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\&.
1777 foo@\&.service),
1778 "test_instance"
1779 will be used as the instance name, which can be controlled by
1780 \fB\-\-instance=\fR
1781 option\&.
1782 .sp
1783 Added in version 250\&.
1784 .RE
1785 .PP
1786 \fB\-\-table\fR
1787 .RS 4
1788 When used with the
1789 \fBplot\fR
1790 command, the raw time data is output in a table\&.
1791 .sp
1792 Added in version 253\&.
1793 .RE
1794 .PP
1795 \fB\-\-no\-legend\fR
1796 .RS 4
1797 When used with the
1798 \fBplot\fR
1799 command in combination with either
1800 \fB\-\-table\fR
1801 or
1802 \fB\-\-json=\fR, no legends or hints are included in the output\&.
1803 .sp
1804 Added in version 253\&.
1805 .RE
1806 .PP
1807 \fB\-H\fR, \fB\-\-host=\fR
1808 .RS 4
1809 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
1810 "@", to connect to\&. The hostname may optionally be suffixed by a port ssh is listening on, separated by
1811 ":", and then a container name, separated by
1812 "/", which connects directly to a specific container on the specified host\&. This will use SSH to talk to the remote machine manager instance\&. Container names may be enumerated with
1813 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&. Put IPv6 addresses in brackets\&.
1814 .RE
1815 .PP
1816 \fB\-M\fR, \fB\-\-machine=\fR
1817 .RS 4
1818 Execute operation on a local container\&. Specify a container name to connect to, optionally prefixed by a user name to connect as and a separating
1819 "@"
1820 character\&. If the special string
1821 "\&.host"
1822 is used in place of the container name, a connection to the local system is made (which is useful to connect to a specific user\*(Aqs user bus:
1823 "\-\-user \-\-machine=lennart@\&.host")\&. If the
1824 "@"
1825 syntax is not used, the connection is made as root user\&. If the
1826 "@"
1827 syntax is used either the left hand side or the right hand side may be omitted (but not both) in which case the local user name and
1828 "\&.host"
1829 are implied\&.
1830 .RE
1831 .PP
1832 \fB\-q\fR, \fB\-\-quiet\fR
1833 .RS 4
1834 Suppress hints and other non\-essential output\&.
1835 .sp
1836 Added in version 250\&.
1837 .RE
1838 .PP
1839 \fB\-\-tldr\fR
1840 .RS 4
1841 With
1842 \fBcat\-config\fR, only print the "interesting" parts of the configuration files, skipping comments and empty lines and section headers followed only by comments and empty lines\&.
1843 .sp
1844 Added in version 255\&.
1845 .RE
1846 .PP
1847 \fB\-\-scale\-svg=\fR\fB\fIFACTOR\fR\fR
1848 .RS 4
1849 When used with the
1850 \fBplot\fR
1851 command, the x\-axis of the plot can be stretched by FACTOR (default: 1\&.0)\&.
1852 .sp
1853 Added in version 257\&.
1854 .RE
1855 .PP
1856 \fB\-\-detailed\fR
1857 .RS 4
1858 When used with the
1859 \fBplot\fR
1860 command, activation timestamps details can be seen in SVG plot\&.
1861 .sp
1862 Added in version 257\&.
1863 .RE
1864 .PP
1865 \fB\-\-drm\-device=\fR\fB\fIPATH\fR\fR
1866 .RS 4
1867 When provided with the
1868 \fBchid\fR
1869 command, use this sysfs path to a DRM device to fetch EDID from\&. Example:
1870 /sys/class/drm/card1\-HDMI\-A\-1/
1871 .sp
1872 Added in version 258\&.
1873 .RE
1874 .PP
1875 \fB\-\-debugger=\fR\fB\fIDEBUGGER\fR\fR
1876 .RS 4
1877 Use the given debugger for the
1878 \fBunit\-gdb\fR
1879 command\&. If not given and
1880 \fI$SYSTEMD_DEBUGGER\fR
1881 is unset, then
1882 \fBgdb\fR(1)
1883 will be used\&.
1884 .sp
1885 Added in version 258\&.
1886 .RE
1887 .PP
1888 \fB\-A\fR \fIARGS\fR, \fB\-\-debugger\-arguments=\fR\fB\fIARGS\fR\fR
1889 .RS 4
1890 Pass the given
1891 \fIARGS\fR
1892 as extra command line arguments to the debugger\&.
1893 .sp
1894 Added in version 258\&.
1895 .RE
1896 .PP
1897 \fB\-h\fR, \fB\-\-help\fR
1898 .RS 4
1899 Print a short help text and exit\&.
1900 .RE
1901 .PP
1902 \fB\-\-version\fR
1903 .RS 4
1904 Print a short version string and exit\&.
1905 .RE
1906 .PP
1907 \fB\-\-no\-pager\fR
1908 .RS 4
1909 Do not pipe output into a pager\&.
1910 .RE
1911 .SH "EXIT STATUS"
1912 .PP
1913 For most verbs,
1914 \fB0\fR
1915 is returned on success, and a non\-zero failure code otherwise\&.
1916 .PP
1917 For the verb
1918 \fBcompare\-versions\fR, in the two\-argument form,
1919 \fB12\fR,
1920 \fB0\fR, or
1921 \fB11\fR
1922 are returned if the second version string is respectively larger than, equal to, or smaller than the first\&. In the three\-argument form,
1923 \fB0\fR
1924 or
1925 \fB1\fR
1926 are returned when the condition is respectively true or false\&.
1927 .PP
1928 For the verb
1929 \fBhas\-tpm2\fR,
1930 \fB0\fR
1931 is returned if a TPM2 device is discovered, supported, and used by firmware, driver, and userspace (i\&.e\&.
1932 \fBsystemd\fR)\&. Otherwise, the OR combination of the value
1933 \fB1\fR
1934 (in case firmware support is missing),
1935 \fB2\fR
1936 (in case driver support is missing), and
1937 \fB4\fR
1938 (in case userspace support is missing)\&. If no TPM2 support is available at all, value
1939 \fB7\fR
1940 is hence returned\&.
1941 .SH "ENVIRONMENT"
1942 .PP
1943 \fI$SYSTEMD_LOG_LEVEL\fR
1944 .RS 4
1945 The maximum log level of emitted messages (messages with a higher log level, i\&.e\&. less important ones, will be suppressed)\&. Takes a comma\-separated list of values\&. A value may be either one of (in order of decreasing importance)
1946 \fBemerg\fR,
1947 \fBalert\fR,
1948 \fBcrit\fR,
1949 \fBerr\fR,
1950 \fBwarning\fR,
1951 \fBnotice\fR,
1952 \fBinfo\fR,
1953 \fBdebug\fR, or an integer in the range 0\&...7\&. See
1954 \fBsyslog\fR(3)
1955 for more information\&. Each value may optionally be prefixed with one of
1956 \fBconsole\fR,
1957 \fBsyslog\fR,
1958 \fBkmsg\fR
1959 or
1960 \fBjournal\fR
1961 followed by a colon to set the maximum log level for that specific log target (e\&.g\&.
1962 \fBSYSTEMD_LOG_LEVEL=debug,console:info\fR
1963 specifies to log at debug level except when logging to the console which should be at info level)\&. Note that the global maximum log level takes priority over any per target maximum log levels\&.
1964 .RE
1965 .PP
1966 \fI$SYSTEMD_LOG_COLOR\fR
1967 .RS 4
1968 A boolean\&. If true, messages written to the tty will be colored according to priority\&.
1969 .sp
1970 This setting is only useful when messages are written directly to the terminal, because
1971 \fBjournalctl\fR(1)
1972 and other tools that display logs will color messages based on the log level on their own\&.
1973 .RE
1974 .PP
1975 \fI$SYSTEMD_LOG_TIME\fR
1976 .RS 4
1977 A boolean\&. If true, console log messages will be prefixed with a timestamp\&.
1978 .sp
1979 This setting is only useful when messages are written directly to the terminal or a file, because
1980 \fBjournalctl\fR(1)
1981 and other tools that display logs will attach timestamps based on the entry metadata on their own\&.
1982 .RE
1983 .PP
1984 \fI$SYSTEMD_LOG_LOCATION\fR
1985 .RS 4
1986 A boolean\&. If true, messages will be prefixed with a filename and line number in the source code where the message originates\&.
1987 .sp
1988 Note that the log location is often attached as metadata to journal entries anyway\&. Including it directly in the message text can nevertheless be convenient when debugging programs\&.
1989 .RE
1990 .PP
1991 \fI$SYSTEMD_LOG_TID\fR
1992 .RS 4
1993 A boolean\&. If true, messages will be prefixed with the current numerical thread ID (TID)\&.
1994 .sp
1995 Note that the this information is attached as metadata to journal entries anyway\&. Including it directly in the message text can nevertheless be convenient when debugging programs\&.
1996 .RE
1997 .PP
1998 \fI$SYSTEMD_LOG_TARGET\fR
1999 .RS 4
2000 The destination for log messages\&. One of
2001 \fBconsole\fR
2002 (log to the attached tty),
2003 \fBconsole\-prefixed\fR
2004 (log to the attached tty but with prefixes encoding the log level and "facility", see
2005 \fBsyslog\fR(3),
2006 \fBkmsg\fR
2007 (log to the kernel circular log buffer),
2008 \fBjournal\fR
2009 (log to the journal),
2010 \fBjournal\-or\-kmsg\fR
2011 (log to the journal if available, and to kmsg otherwise),
2012 \fBauto\fR
2013 (determine the appropriate log target automatically, the default),
2014 \fBnull\fR
2015 (disable log output)\&.
2016 .RE
2017 .PP
2018 \fI$SYSTEMD_LOG_RATELIMIT_KMSG\fR
2019 .RS 4
2020 Whether to ratelimit kmsg or not\&. Takes a boolean\&. Defaults to
2021 "true"\&. If disabled, systemd will not ratelimit messages written to kmsg\&.
2022 .RE
2023 .PP
2024 \fI$SYSTEMD_PAGER\fR, \fI$PAGER\fR
2025 .RS 4
2026 Pager to use when
2027 \fB\-\-no\-pager\fR
2028 is not given\&.
2029 \fI$SYSTEMD_PAGER\fR
2030 is used if set; otherwise
2031 \fI$PAGER\fR
2032 is used\&. If neither
2033 \fI$SYSTEMD_PAGER\fR
2034 nor
2035 \fI$PAGER\fR
2036 are set, a set of well\-known pager implementations is tried in turn, including
2037 \fBless\fR(1)
2038 and
2039 \fBmore\fR(1), until one is found\&. If no pager implementation is discovered, no pager is invoked\&. Setting those environment variables to an empty string or the value
2040 "cat"
2041 is equivalent to passing
2042 \fB\-\-no\-pager\fR\&.
2043 .sp
2044 Note: if
2045 \fI$SYSTEMD_PAGERSECURE\fR
2046 is not set,
2047 \fI$SYSTEMD_PAGER\fR
2048 and
2049 \fI$PAGER\fR
2050 can only be used to disable the pager (with
2051 "cat"
2052 or
2053 ""), and are otherwise ignored\&.
2054 .RE
2055 .PP
2056 \fI$SYSTEMD_LESS\fR
2057 .RS 4
2058 Override the options passed to
2059 \fBless\fR
2060 (by default
2061 "FRSXMK")\&.
2062 .sp
2063 Users might want to change two options in particular:
2064 .PP
2065 \fBK\fR
2066 .RS 4
2067 This option instructs the pager to exit immediately when
2068 Ctrl+C
2069 is pressed\&. To allow
2070 \fBless\fR
2071 to handle
2072 Ctrl+C
2073 itself to switch back to the pager command prompt, unset this option\&.
2074 .sp
2075 If the value of
2076 \fI$SYSTEMD_LESS\fR
2077 does not include
2078 "K", and the pager that is invoked is
2079 \fBless\fR,
2080 Ctrl+C
2081 will be ignored by the executable, and needs to be handled by the pager\&.
2082 .RE
2083 .PP
2084 \fBX\fR
2085 .RS 4
2086 This option instructs the pager to not send termcap initialization and deinitialization strings to the terminal\&. It is set by default to allow command output to remain visible in the terminal even after the pager exits\&. Nevertheless, this prevents some pager functionality from working, in particular paged output cannot be scrolled with the mouse\&.
2087 .RE
2088 .sp
2089 Note that setting the regular
2090 \fI$LESS\fR
2091 environment variable has no effect for
2092 \fBless\fR
2093 invocations by systemd tools\&.
2094 .sp
2095 See
2096 \fBless\fR(1)
2097 for more discussion\&.
2098 .RE
2099 .PP
2100 \fI$SYSTEMD_LESSCHARSET\fR
2101 .RS 4
2102 Override the charset passed to
2103 \fBless\fR
2104 (by default
2105 "utf\-8", if the invoking terminal is determined to be UTF\-8 compatible)\&.
2106 .sp
2107 Note that setting the regular
2108 \fI$LESSCHARSET\fR
2109 environment variable has no effect for
2110 \fBless\fR
2111 invocations by systemd tools\&.
2112 .RE
2113 .PP
2114 \fI$SYSTEMD_PAGERSECURE\fR
2115 .RS 4
2116 Common pager commands like
2117 \fBless\fR(1), in addition to "paging", i\&.e\&. scrolling through the output, support opening of or writing to other files and running arbitrary shell commands\&. When commands are invoked with elevated privileges, for example under
2118 \fBsudo\fR(8)
2119 or
2120 \fBpkexec\fR(1), the pager becomes a security boundary\&. Care must be taken that only programs with strictly limited functionality are used as pagers, and unintended interactive features like opening or creation of new files or starting of subprocesses are not allowed\&. "Secure mode" for the pager may be enabled as described below,
2121 \fIif the pager supports that\fR
2122 (most pagers are not written in a way that takes this into consideration)\&. It is recommended to either explicitly enable "secure mode" or to completely disable the pager using
2123 \fB\-\-no\-pager\fR
2124 or
2125 \fIPAGER=cat\fR
2126 when allowing untrusted users to execute commands with elevated privileges\&.
2127 .sp
2128 This option takes a boolean argument\&. When set to true, the "secure mode" of the pager is enabled\&. In "secure mode",
2129 \fBLESSSECURE=1\fR
2130 will be set when invoking the pager, which instructs the pager to disable commands that open or create new files or start new subprocesses\&. Currently only
2131 \fBless\fR(1)
2132 is known to understand this variable and implement "secure mode"\&.
2133 .sp
2134 When set to false, no limitation is placed on the pager\&. Setting
2135 \fISYSTEMD_PAGERSECURE=0\fR
2136 or not removing it from the inherited environment may allow the user to invoke arbitrary commands\&.
2137 .sp
2138 When
2139 \fI$SYSTEMD_PAGERSECURE\fR
2140 is not set, systemd tools attempt to automatically figure out if "secure mode" should be enabled and whether the pager supports it\&. "Secure mode" is enabled if the effective UID is not the same as the owner of the login session, see
2141 \fBgeteuid\fR(2)
2142 and
2143 \fBsd_pid_get_owner_uid\fR(3), or when running under
2144 \fBsudo\fR(8)
2145 or similar tools (\fI$SUDO_UID\fR
2146 is set
2147 \&\s-2\u[4]\d\s+2)\&. In those cases,
2148 \fISYSTEMD_PAGERSECURE=1\fR
2149 will be set and pagers which are not known to implement "secure mode" will not be used at all\&. Note that this autodetection only covers the most common mechanisms to elevate privileges and is intended as convenience\&. It is recommended to explicitly set
2150 \fI$SYSTEMD_PAGERSECURE\fR
2151 or disable the pager\&.
2152 .sp
2153 Note that if the
2154 \fI$SYSTEMD_PAGER\fR
2155 or
2156 \fI$PAGER\fR
2157 variables are to be honoured, other than to disable the pager,
2158 \fI$SYSTEMD_PAGERSECURE\fR
2159 must be set too\&.
2160 .RE
2161 .PP
2162 \fI$SYSTEMD_COLORS\fR
2163 .RS 4
2164 Takes a boolean argument\&. When true,
2165 \fBsystemd\fR
2166 and related utilities will use colors in their output, otherwise the output will be monochrome\&. Additionally, the variable can take one of the following special values:
2167 "16",
2168 "256"
2169 to restrict the use of colors to the base 16 or 256 ANSI colors, respectively\&. This can be specified to override the automatic decision based on
2170 \fI$TERM\fR
2171 and what the console is connected to\&.
2172 .RE
2173 .PP
2174 \fI$SYSTEMD_URLIFY\fR
2175 .RS 4
2176 The value must be a boolean\&. Controls whether clickable links should be generated in the output for terminal emulators supporting this\&. This can be specified to override the decision that
2177 \fBsystemd\fR
2178 makes based on
2179 \fI$TERM\fR
2180 and other conditions\&.
2181 .RE
2182 .SH "EXAMPLES"
2183 .PP
2184 \fBExample\ \&33.\ \&JSON Policy\fR
2185 .PP
2186 The JSON file passed as a path parameter to
2187 \fB\-\-security\-policy=\fR
2188 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:
2189 \fBdescription_na\fR
2190 (string),
2191 \fBdescription_good\fR
2192 (string),
2193 \fBdescription_bad\fR
2194 (string),
2195 \fBweight\fR
2196 (unsigned integer), and
2197 \fBrange\fR
2198 (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 \*(Aqsecurity\*(Aq 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
2199 "0"
2200 means the setting will not be checked\&.
2201 .sp
2202 .if n \{\
2203 .RS 4
2204 .\}
2205 .nf
2206 {
2207 "PrivateDevices":
2208 {
2209 "description_good": "Service has no access to hardware devices",
2210 "description_bad": "Service potentially has access to hardware devices",
2211 "weight": 1000,
2212 "range": 1
2213 },
2214 "PrivateMounts":
2215 {
2216 "description_good": "Service cannot install system mounts",
2217 "description_bad": "Service may install system mounts",
2218 "weight": 1000,
2219 "range": 1
2220 },
2221 "PrivateNetwork":
2222 {
2223 "description_good": "Service has no access to the host\*(Aqs network",
2224 "description_bad": "Service has access to the host\*(Aqs network",
2225 "weight": 2500,
2226 "range": 1
2227 },
2228 "PrivateTmp":
2229 {
2230 "description_good": "Service has no access to other software\*(Aqs temporary files",
2231 "description_bad": "Service has access to other software\*(Aqs temporary files",
2232 "weight": 1000,
2233 "range": 1
2234 },
2235 "PrivateUsers":
2236 {
2237 "description_good": "Service does not have access to other users",
2238 "description_bad": "Service has access to other users",
2239 "weight": 1000,
2240 "range": 1
2241 }
2242 }
2243 .fi
2244 .if n \{\
2245 .RE
2246 .\}
2247 .SH "SEE ALSO"
2248 .PP
2249 \fBsystemd\fR(1), \fBsystemctl\fR(1)
2250 .SH "NOTES"
2251 .IP " 1." 4
2252 Package Metadata for Executable Files
2253 .RS 4
2254 \%https://systemd.io/PACKAGE_METADATA_FOR_EXECUTABLE_FILES/
2255 .RE
2256 .IP " 2." 4
2257 Discoverable Partitions Specification
2258 .RS 4
2259 \%https://uapi-group.org/specifications/specs/discoverable_partitions_specification
2260 .RE
2261 .IP " 3." 4
2262 Using Computer Hardware IDs (CHIDs)
2263 .RS 4
2264 \%https://learn.microsoft.com/en-us/windows-hardware/drivers/dashboard/using-chids
2265 .RE
2266 .IP " 4." 4
2267 It is recommended for other tools to set and check
2268 \fI$SUDO_UID\fR
2269 as appropriate, treating it is a common interface.
2270