Debian Codegraph @

upstream/fedora-44/man1/systemd-analyze.1

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