1SYSTEMD-ANALYZE(1) systemd-analyze SYSTEMD-ANALYZE(1)
2
3
4
6 systemd-analyze - Analyze and debug system manager
7
9 systemd-analyze [OPTIONS...] [time]
10
11 systemd-analyze [OPTIONS...] blame
12
13 systemd-analyze [OPTIONS...] critical-chain [UNIT...]
14
15 systemd-analyze [OPTIONS...] dump [PATTERN...]
16
17 systemd-analyze [OPTIONS...] plot [>file.svg]
18
19 systemd-analyze [OPTIONS...] dot [PATTERN...] [>file.dot]
20
21 systemd-analyze [OPTIONS...] unit-files
22
23 systemd-analyze [OPTIONS...] unit-paths
24
25 systemd-analyze [OPTIONS...] exit-status [STATUS...]
26
27 systemd-analyze [OPTIONS...] capability [CAPABILITY...]
28
29 systemd-analyze [OPTIONS...] condition CONDITION...
30
31 systemd-analyze [OPTIONS...] syscall-filter [SET...]
32
33 systemd-analyze [OPTIONS...] filesystems [SET...]
34
35 systemd-analyze [OPTIONS...] calendar SPEC...
36
37 systemd-analyze [OPTIONS...] timestamp TIMESTAMP...
38
39 systemd-analyze [OPTIONS...] timespan SPAN...
40
41 systemd-analyze [OPTIONS...] cat-config NAME|PATH...
42
43 systemd-analyze [OPTIONS...] compare-versions VERSION1 [OP] VERSION2
44
45 systemd-analyze [OPTIONS...] verify [FILE...]
46
47 systemd-analyze [OPTIONS...] security UNIT...
48
49 systemd-analyze [OPTIONS...] inspect-elf FILE...
50
51 systemd-analyze [OPTIONS...] malloc [D-BUS SERVICE...]
52
53 systemd-analyze [OPTIONS...] fdstore [UNIT...]
54
55 systemd-analyze [OPTIONS...] image-policy POLICY...
56
57 systemd-analyze [OPTIONS...] pcrs [PCR...]
58
60 systemd-analyze may be used to determine system boot-up performance
61 statistics and retrieve other state and tracing information from the
62 system and service manager, and to verify the correctness of unit
63 files. It is also used to access special functions useful for advanced
64 system manager debugging.
65
66 If no command is passed, systemd-analyze time is implied.
67
68 systemd-analyze time
69 This command prints the time spent in the kernel before userspace has
70 been reached, the time spent in the initrd before normal system
71 userspace has been reached, and the time normal system userspace took
72 to initialize. Note that these measurements simply measure the time
73 passed up to the point where all system services have been spawned, but
74 not necessarily until they fully finished initialization or the disk is
75 idle.
76
77 Example 1. Show how long the boot took
78
79 # in a container
80 $ systemd-analyze time
81 Startup finished in 296ms (userspace)
82 multi-user.target reached after 275ms in userspace
83
84 # on a real machine
85 $ systemd-analyze time
86 Startup finished in 2.584s (kernel) + 19.176s (initrd) + 47.847s (userspace) = 1min 9.608s
87 multi-user.target reached after 47.820s in userspace
88
89 systemd-analyze blame
90 This command prints a list of all running units, ordered by the time
91 they took to initialize. This information may be used to optimize
92 boot-up times. Note that the output might be misleading as the
93 initialization of one service might be slow simply because it waits for
94 the initialization of another service to complete. Also note:
95 systemd-analyze blame doesn't display results for services with
96 Type=simple, because systemd considers such services to be started
97 immediately, hence no measurement of the initialization delays can be
98 done. Also note that this command only shows the time units took for
99 starting up, it does not show how long unit jobs spent in the execution
100 queue. In particular it shows the time units spent in "activating"
101 state, which is not defined for units such as device units that
102 transition directly from "inactive" to "active". This command hence
103 gives an impression of the performance of program code, but cannot
104 accurately reflect latency introduced by waiting for hardware and
105 similar events.
106
107 Example 2. Show which units took the most time during boot
108
109 $ systemd-analyze blame
110 32.875s pmlogger.service
111 20.905s systemd-networkd-wait-online.service
112 13.299s dev-vda1.device
113 ...
114 23ms sysroot.mount
115 11ms initrd-udevadm-cleanup-db.service
116 3ms sys-kernel-config.mount
117
118
119 systemd-analyze critical-chain [UNIT...]
120 This command prints a tree of the time-critical chain of units (for
121 each of the specified UNITs or for the default target otherwise). The
122 time after the unit is active or started is printed after the "@"
123 character. The time the unit takes to start is printed after the "+"
124 character. Note that the output might be misleading as the
125 initialization of services might depend on socket activation and
126 because of the parallel execution of units. Also, similarly to the
127 blame command, this only takes into account the time units spent in
128 "activating" state, and hence does not cover units that never went
129 through an "activating" state (such as device units that transition
130 directly from "inactive" to "active"). Moreover it does not show
131 information on jobs (and in particular not jobs that timed out).
132
133 Example 3. systemd-analyze critical-chain
134
135 $ systemd-analyze critical-chain
136 multi-user.target @47.820s
137 └─pmie.service @35.968s +548ms
138 └─pmcd.service @33.715s +2.247s
139 └─network-online.target @33.712s
140 └─systemd-networkd-wait-online.service @12.804s +20.905s
141 └─systemd-networkd.service @11.109s +1.690s
142 └─systemd-udevd.service @9.201s +1.904s
143 └─systemd-tmpfiles-setup-dev.service @7.306s +1.776s
144 └─kmod-static-nodes.service @6.976s +177ms
145 └─systemd-journald.socket
146 └─system.slice
147 └─-.slice
148
149 systemd-analyze dump [pattern...]
150 Without any parameter, this command outputs a (usually very long)
151 human-readable serialization of the complete service manager state.
152 Optional glob pattern may be specified, causing the output to be
153 limited to units whose names match one of the patterns. The output
154 format is subject to change without notice and should not be parsed by
155 applications. This command is rate limited for unprivileged users.
156
157 Example 4. Show the internal state of user manager
158
159 $ systemd-analyze --user dump
160 Timestamp userspace: Thu 2019-03-14 23:28:07 CET
161 Timestamp finish: Thu 2019-03-14 23:28:07 CET
162 Timestamp generators-start: Thu 2019-03-14 23:28:07 CET
163 Timestamp generators-finish: Thu 2019-03-14 23:28:07 CET
164 Timestamp units-load-start: Thu 2019-03-14 23:28:07 CET
165 Timestamp units-load-finish: Thu 2019-03-14 23:28:07 CET
166 -> Unit proc-timer_list.mount:
167 Description: /proc/timer_list
168 ...
169 -> Unit default.target:
170 Description: Main user target
171 ...
172
173 systemd-analyze malloc [D-Bus service...]
174 This command can be used to request the output of the internal memory
175 state (as returned by malloc_info(3)) of a D-Bus service. If no service
176 is specified, the query will be sent to org.freedesktop.systemd1 (the
177 system or user service manager). The output format is not guaranteed to
178 be stable and should not be parsed by applications.
179
180 The service must implement the org.freedesktop.MemoryAllocation1
181 interface. In the systemd suite, it is currently only implemented by
182 the manager.
183
184 systemd-analyze plot
185 This command prints either an SVG graphic, detailing which system
186 services have been started at what time, highlighting the time they
187 spent on initialization, or the raw time data in JSON or table format.
188
189 Example 5. Plot a bootchart
190
191 $ systemd-analyze plot >bootup.svg
192 $ eog bootup.svg&
193
194 Note that this plot is based on the most recent per-unit timing data of
195 loaded units. This means that if a unit gets started, then stopped and
196 then started again the information shown will cover the most recent
197 start cycle, not the first one. Thus it's recommended to consult this
198 information only shortly after boot, so that this distinction doesn't
199 matter. Moreover, units that are not referenced by any other unit
200 through a dependency might be unloaded by the service manager once they
201 terminate (and did not fail). Such units will not show up in the plot.
202
203 systemd-analyze dot [pattern...]
204 This command generates textual dependency graph description in dot
205 format for further processing with the GraphViz dot(1) tool. Use a
206 command line like systemd-analyze dot | dot -Tsvg >systemd.svg to
207 generate a graphical dependency tree. Unless --order or --require is
208 passed, the generated graph will show both ordering and requirement
209 dependencies. Optional pattern globbing style specifications (e.g.
210 *.target) may be given at the end. A unit dependency is included in the
211 graph if any of these patterns match either the origin or destination
212 node.
213
214 Example 6. Plot all dependencies of any unit whose name starts with
215 "avahi-daemon"
216
217 $ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg >avahi.svg
218 $ eog avahi.svg
219
220 Example 7. Plot the dependencies between all known target units
221
222 $ systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' \
223 | dot -Tsvg >targets.svg
224 $ eog targets.svg
225
226 systemd-analyze unit-paths
227 This command outputs a list of all directories from which unit files,
228 .d overrides, and .wants, .requires symlinks may be loaded. Combine
229 with --user to retrieve the list for the user manager instance, and
230 --global for the global configuration of user manager instances.
231
232 Example 8. Show all paths for generated units
233
234 $ systemd-analyze unit-paths | grep '^/run'
235 /run/systemd/system.control
236 /run/systemd/transient
237 /run/systemd/generator.early
238 /run/systemd/system
239 /run/systemd/system.attached
240 /run/systemd/generator
241 /run/systemd/generator.late
242
243 Note that this verb prints the list that is compiled into
244 systemd-analyze itself, and does not communicate with the running
245 manager. Use
246
247 systemctl [--user] [--global] show -p UnitPath --value
248
249 to retrieve the actual list that the manager uses, with any empty
250 directories omitted.
251
252 systemd-analyze exit-status [STATUS...]
253 This command prints a list of exit statuses along with their "class",
254 i.e. the source of the definition (one of "glibc", "systemd", "LSB", or
255 "BSD"), see the Process Exit Codes section in systemd.exec(5). If no
256 additional arguments are specified, all known statuses are shown.
257 Otherwise, only the definitions for the specified codes are shown.
258
259 Example 9. Show some example exit status names
260
261 $ systemd-analyze exit-status 0 1 {63..65}
262 NAME STATUS CLASS
263 SUCCESS 0 glibc
264 FAILURE 1 glibc
265 - 63 -
266 USAGE 64 BSD
267 DATAERR 65 BSD
268
269 systemd-analyze capability [CAPABILITY...]
270 This command prints a list of Linux capabilities along with their
271 numeric IDs. See capabilities(7) for details. If no argument is
272 specified the full list of capabilities known to the service manager
273 and the kernel is shown. Capabilities defined by the kernel but not
274 known to the service manager are shown as "cap_???". Optionally, if
275 arguments are specified they may refer to specific cabilities by name
276 or numeric ID, in which case only the indicated capabilities are shown
277 in the table.
278
279 Example 10. Show some example capability names
280
281 $ systemd-analyze capability 0 1 {30..32}
282 NAME NUMBER
283 cap_chown 0
284 cap_dac_override 1
285 cap_audit_control 30
286 cap_setfcap 31
287 cap_mac_override 32
288
289 systemd-analyze condition CONDITION...
290 This command will evaluate Condition*=... and Assert*=...
291 assignments, and print their values, and the resulting value of the
292 combined condition set. See systemd.unit(5) for a list of available
293 conditions and asserts.
294
295 Example 11. Evaluate conditions that check kernel versions
296
297 $ systemd-analyze condition 'ConditionKernelVersion = ! <4.0' \
298 'ConditionKernelVersion = >=5.1' \
299 'ConditionACPower=|false' \
300 'ConditionArchitecture=|!arm' \
301 'AssertPathExists=/etc/os-release'
302 test.service: AssertPathExists=/etc/os-release succeeded.
303 Asserts succeeded.
304 test.service: ConditionArchitecture=|!arm succeeded.
305 test.service: ConditionACPower=|false failed.
306 test.service: ConditionKernelVersion=>=5.1 succeeded.
307 test.service: ConditionKernelVersion=!<4.0 succeeded.
308 Conditions succeeded.
309
310 systemd-analyze syscall-filter [SET...]
311 This command will list system calls contained in the specified system
312 call set SET, or all known sets if no sets are specified. Argument SET
313 must include the "@" prefix.
314
315 systemd-analyze filesystems [SET...]
316 This command will list filesystems in the specified filesystem set SET,
317 or all known sets if no sets are specified. Argument SET must include
318 the "@" prefix.
319
320 systemd-analyze calendar EXPRESSION...
321 This command will parse and normalize repetitive calendar time events,
322 and will calculate when they elapse next. This takes the same input as
323 the OnCalendar= setting in systemd.timer(5), following the syntax
324 described in systemd.time(7). By default, only the next time the
325 calendar expression will elapse is shown; use --iterations= to show the
326 specified number of next times the expression elapses. Each time the
327 expression elapses forms a timestamp, see the timestamp verb below.
328
329 Example 12. Show leap days in the near future
330
331 $ systemd-analyze calendar --iterations=5 '*-2-29 0:0:0'
332 Original form: *-2-29 0:0:0
333 Normalized form: *-02-29 00:00:00
334 Next elapse: Sat 2020-02-29 00:00:00 UTC
335 From now: 11 months 15 days left
336 Iter. #2: Thu 2024-02-29 00:00:00 UTC
337 From now: 4 years 11 months left
338 Iter. #3: Tue 2028-02-29 00:00:00 UTC
339 From now: 8 years 11 months left
340 Iter. #4: Sun 2032-02-29 00:00:00 UTC
341 From now: 12 years 11 months left
342 Iter. #5: Fri 2036-02-29 00:00:00 UTC
343 From now: 16 years 11 months left
344
345 systemd-analyze timestamp TIMESTAMP...
346 This command parses a timestamp (i.e. a single point in time) and
347 outputs the normalized form and the difference between this timestamp
348 and now. The timestamp should adhere to the syntax documented in
349 systemd.time(7), section "PARSING TIMESTAMPS".
350
351 Example 13. Show parsing of timestamps
352
353 $ systemd-analyze timestamp yesterday now tomorrow
354 Original form: yesterday
355 Normalized form: Mon 2019-05-20 00:00:00 CEST
356 (in UTC): Sun 2019-05-19 22:00:00 UTC
357 UNIX seconds: @15583032000
358 From now: 1 day 9h ago
359
360 Original form: now
361 Normalized form: Tue 2019-05-21 09:48:39 CEST
362 (in UTC): Tue 2019-05-21 07:48:39 UTC
363 UNIX seconds: @1558424919.659757
364 From now: 43us ago
365
366 Original form: tomorrow
367 Normalized form: Wed 2019-05-22 00:00:00 CEST
368 (in UTC): Tue 2019-05-21 22:00:00 UTC
369 UNIX seconds: @15584760000
370 From now: 14h left
371
372 systemd-analyze timespan EXPRESSION...
373 This command parses a time span (i.e. a difference between two
374 timestamps) and outputs the normalized form and the equivalent value in
375 microseconds. The time span should adhere to the syntax documented in
376 systemd.time(7), section "PARSING TIME SPANS". Values without units are
377 parsed as seconds.
378
379 Example 14. Show parsing of timespans
380
381 $ systemd-analyze timespan 1s 300s '1year 0.000001s'
382 Original: 1s
383 μs: 1000000
384 Human: 1s
385
386 Original: 300s
387 μs: 300000000
388 Human: 5min
389
390 Original: 1year 0.000001s
391 μs: 31557600000001
392 Human: 1y 1us
393
394 systemd-analyze cat-config NAME|PATH...
395 This command is similar to systemctl cat, but operates on config files.
396 It will copy the contents of a config file and any drop-ins to standard
397 output, using the usual systemd set of directories and rules for
398 precedence. Each argument must be either an absolute path including the
399 prefix (such as /etc/systemd/logind.conf or
400 /usr/lib/systemd/logind.conf), or a name relative to the prefix (such
401 as systemd/logind.conf).
402
403 Example 15. Showing logind configuration
404
405 $ systemd-analyze cat-config systemd/logind.conf
406 # /etc/systemd/logind.conf
407 ...
408 [Login]
409 NAutoVTs=8
410 ...
411
412 # /usr/lib/systemd/logind.conf.d/20-test.conf
413 ... some override from another package
414
415 # /etc/systemd/logind.conf.d/50-override.conf
416 ... some administrator override
417
418
419 systemd-analyze compare-versions VERSION1 [OP] VERSION2
420 This command has two distinct modes of operation, depending on whether
421 the operator OP is specified.
422
423 In the first mode — when OP is not specified — it will compare the two
424 version strings and print either "VERSION1 < VERSION2", or "VERSION1 ==
425 VERSION2", or "VERSION1 > VERSION2" as appropriate.
426
427 The exit status is 0 if the versions are equal, 11 if the version of
428 the right is smaller, and 12 if the version of the left is smaller.
429 (This matches the convention used by rpmdev-vercmp.)
430
431 In the second mode — when OP is specified — it will compare the two
432 version strings using the operation OP and return 0 (success) if they
433 condition is satisfied, and 1 (failure) otherwise. OP may be lt, le,
434 eq, ne, ge, gt. In this mode, no output is printed. (This matches the
435 convention used by dpkg(1) --compare-versions.)
436
437 Example 16. Compare versions of a package
438
439 $ systemd-analyze compare-versions systemd-250~rc1.fc36.aarch64 systemd-251.fc36.aarch64
440 systemd-250~rc1.fc36.aarch64 < systemd-251.fc36.aarch64
441 $ echo $?
442 12
443
444 $ systemd-analyze compare-versions 1 lt 2; echo $?
445 0
446 $ systemd-analyze compare-versions 1 ge 2; echo $?
447 1
448
449
450 systemd-analyze verify FILE...
451 This command will load unit files and print warnings if any errors are
452 detected. Files specified on the command line will be loaded, but also
453 any other units referenced by them. A unit's name on disk can be
454 overridden by specifying an alias after a colon; see below for an
455 example. The full unit search path is formed by combining the
456 directories for all command line arguments, and the usual unit load
457 paths. The variable $SYSTEMD_UNIT_PATH is supported, and may be used to
458 replace or augment the compiled in set of unit load paths; see
459 systemd.unit(5). All units files present in the directories containing
460 the command line arguments will be used in preference to the other
461 paths.
462
463 The following errors are currently detected:
464
465 • unknown sections and directives,
466
467 • missing dependencies which are required to start the given unit,
468
469 • man pages listed in Documentation= which are not found in the
470 system,
471
472 • commands listed in ExecStart= and similar which are not found in
473 the system or not executable.
474
475 Example 17. Misspelt directives
476
477 $ cat ./user.slice
478 [Unit]
479 WhatIsThis=11
480 Documentation=man:nosuchfile(1)
481 Requires=different.service
482
483 [Service]
484 Description=x
485
486 $ systemd-analyze verify ./user.slice
487 [./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
488 [./user.slice:13] Unknown section 'Service'. Ignoring.
489 Error: org.freedesktop.systemd1.LoadFailed:
490 Unit different.service failed to load:
491 No such file or directory.
492 Failed to create user.slice/start: Invalid argument
493 user.slice: man nosuchfile(1) command failed with code 16
494
495
496 Example 18. Missing service units
497
498 $ tail ./a.socket ./b.socket
499 ==> ./a.socket <==
500 [Socket]
501 ListenStream=100
502
503 ==> ./b.socket <==
504 [Socket]
505 ListenStream=100
506 Accept=yes
507
508 $ systemd-analyze verify ./a.socket ./b.socket
509 Service a.service not loaded, a.socket cannot be started.
510 Service b@0.service not loaded, b.socket cannot be started.
511
512
513 Example 19. Aliasing a unit
514
515 $ cat /tmp/source
516 [Unit]
517 Description=Hostname printer
518
519 [Service]
520 Type=simple
521 ExecStart=/usr/bin/echo %H
522 MysteryKey=true
523
524 $ systemd-analyze verify /tmp/source
525 Failed to prepare filename /tmp/source: Invalid argument
526
527 $ systemd-analyze verify /tmp/source:alias.service
528 alias.service:7: Unknown key name 'MysteryKey' in section 'Service', ignoring.
529
530
531 systemd-analyze security [UNIT...]
532 This command analyzes the security and sandboxing settings of one or
533 more specified service units. If at least one unit name is specified
534 the security settings of the specified service units are inspected and
535 a detailed analysis is shown. If no unit name is specified, all
536 currently loaded, long-running service units are inspected and a terse
537 table with results shown. The command checks for various
538 security-related service settings, assigning each a numeric "exposure
539 level" value, depending on how important a setting is. It then
540 calculates an overall exposure level for the whole unit, which is an
541 estimation in the range 0.0...10.0 indicating how exposed a service is
542 security-wise. High exposure levels indicate very little applied
543 sandboxing. Low exposure levels indicate tight sandboxing and strongest
544 security restrictions. Note that this only analyzes the per-service
545 security features systemd itself implements. This means that any
546 additional security mechanisms applied by the service code itself are
547 not accounted for. The exposure level determined this way should not be
548 misunderstood: a high exposure level neither means that there is no
549 effective sandboxing applied by the service code itself, nor that the
550 service is actually vulnerable to remote or local attacks. High
551 exposure levels do indicate however that most likely the service might
552 benefit from additional settings applied to them.
553
554 Please note that many of the security and sandboxing settings
555 individually can be circumvented — unless combined with others. For
556 example, if a service retains the privilege to establish or undo mount
557 points many of the sandboxing options can be undone by the service code
558 itself. Due to that is essential that each service uses the most
559 comprehensive and strict sandboxing and security settings possible. The
560 tool will take into account some of these combinations and
561 relationships between the settings, but not all. Also note that the
562 security and sandboxing settings analyzed here only apply to the
563 operations executed by the service code itself. If a service has access
564 to an IPC system (such as D-Bus) it might request operations from other
565 services that are not subject to the same restrictions. Any
566 comprehensive security and sandboxing analysis is hence incomplete if
567 the IPC access policy is not validated too.
568
569 Example 20. Analyze systemd-logind.service
570
571 $ systemd-analyze security --no-pager systemd-logind.service
572 NAME DESCRIPTION EXPOSURE
573 ✗ PrivateNetwork= Service has access to the host's network 0.5
574 ✗ User=/DynamicUser= Service runs as root user 0.4
575 ✗ DeviceAllow= Service has no device ACL 0.2
576 ✓ IPAddressDeny= Service blocks all IP address ranges
577 ...
578 → Overall exposure level for systemd-logind.service: 4.1 OK 🙂
579
580 systemd-analyze inspect-elf FILE...
581 This command will load the specified files, and if they are ELF objects
582 (executables, libraries, core files, etc.) it will parse the embedded
583 packaging metadata, if any, and print it in a table or json format. See
584 the Packaging Metadata[1] documentation for more information.
585
586 Example 21. Print information about a core file as JSON
587
588 $ systemd-analyze inspect-elf --json=pretty \
589 core.fsverity.1000.f77dac5dc161402aa44e15b7dd9dcf97.58561.1637106137000000
590 {
591 "elfType" : "coredump",
592 "elfArchitecture" : "AMD x86-64",
593 "/home/bluca/git/fsverity-utils/fsverity" : {
594 "type" : "deb",
595 "name" : "fsverity-utils",
596 "version" : "1.3-1",
597 "buildId" : "7c895ecd2a271f93e96268f479fdc3c64a2ec4ee"
598 },
599 "/home/bluca/git/fsverity-utils/libfsverity.so.0" : {
600 "type" : "deb",
601 "name" : "fsverity-utils",
602 "version" : "1.3-1",
603 "buildId" : "b5e428254abf14237b0ae70ed85fffbb98a78f88"
604 }
605 }
606
607
608 systemd-analyze fdstore [UNIT...]
609 Lists the current contents of the specified service unit's file
610 descriptor store. This shows names, inode types, device numbers, inode
611 numbers, paths and open modes of the open file descriptors. The
612 specified units must have FileDescriptorStoreMax= enabled, see
613 systemd.service(5) for details.
614
615 Example 22. Table output
616
617 $ systemd-analyze fdstore systemd-journald.service
618 FDNAME TYPE DEVNO INODE RDEVNO PATH FLAGS
619 stored sock 0:8 4218620 - socket:[4218620] ro
620 stored sock 0:8 4213198 - socket:[4213198] ro
621 stored sock 0:8 4213190 - socket:[4213190] ro
622 ...
623
624 Note: the "DEVNO" column refers to the major/minor numbers of the
625 device node backing the file system the file descriptor's inode is on.
626 The "RDEVNO" column refers to the major/minor numbers of the device
627 node itself if the file descriptor refers to one. Compare with
628 corresponding .st_dev and .st_rdev fields in struct stat (see stat(2)
629 for details). The listed inode numbers in the "INODE" column are on the
630 file system indicated by "DEVNO".
631
632 systemd-analyze image-policy [POLICY...]
633 This command analyzes the specified image policy string, as per
634 systemd.image-policy(7). The policy is normalized and simplified. For
635 each currently defined partition identifier (as per the Discoverable
636 Partitions Specification[2] the effect of the image policy string is
637 shown in tabular form.
638
639 Example 23. Example Output
640
641 $ systemd-analyze image-policy swap=encrypted:usr=read-only-on+verity:root=encrypted
642 Analyzing policy: root=encrypted:usr=verity+read-only-on:swap=encrypted
643 Long form: root=encrypted:usr=verity+read-only-on:swap=encrypted:=unused+absent
644
645 PARTITION MODE READ-ONLY GROWFS
646 root encrypted - -
647 usr verity yes -
648 home ignore - -
649 srv ignore - -
650 esp ignore - -
651 xbootldr ignore - -
652 swap encrypted - -
653 root-verity ignore - -
654 usr-verity unprotected yes -
655 root-verity-sig ignore - -
656 usr-verity-sig ignore - -
657 tmp ignore - -
658 var ignore - -
659 default ignore - -
660
661 systemd-analyze pcrs [PCR...]
662 This command shows the known TPM2 PCRs along with their identifying
663 names and current values.
664
665 Example 24. Example Output
666
667 $ systemd-analyze pcrs
668 NR NAME SHA256
669 0 platform-code bcd2eb527108bbb1f5528409bcbe310aa9b74f687854cc5857605993f3d9eb11
670 1 platform-config b60622856eb7ce52637b80f30a520e6e87c347daa679f3335f4f1a600681bb01
671 2 external-code 1471262403e9a62f9c392941300b4807fbdb6f0bfdd50abfab752732087017dd
672 3 external-config 3d458cfe55cc03ea1f443f1562beec8df51c75e14a9fcf9a7234a13f198e7969
673 4 boot-loader-code 939f7fa1458e1f7ce968874d908e524fc0debf890383d355e4ce347b7b78a95c
674 5 boot-loader-config 864c61c5ea5ecbdb6951e6cb6d9c1f4b4eac79772f7fe13b8bece569d83d3768
675 6 - 3d458cfe55cc03ea1f443f1562beec8df51c75e14a9fcf9a7234a13f198e7969
676 7 secure-boot-policy 9c905bd9b9891bfb889b90a54c4b537b889cfa817c4389cc25754823a9443255
677 8 - 0000000000000000000000000000000000000000000000000000000000000000
678 9 kernel-initrd 9caa29b128113ef42aa53d421f03437be57211e5ebafc0fa8b5d4514ee37ff0c
679 10 ima 5ea9e3dab53eb6b483b6ec9e3b2c712bea66bca1b155637841216e0094387400
680 11 kernel-boot 0000000000000000000000000000000000000000000000000000000000000000
681 12 kernel-config 627ffa4b405e911902fe1f1a8b0164693b31acab04f805f15bccfe2209c7eace
682 13 sysexts 0000000000000000000000000000000000000000000000000000000000000000
683 14 shim-policy 0000000000000000000000000000000000000000000000000000000000000000
684 15 system-identity 0000000000000000000000000000000000000000000000000000000000000000
685 16 debug 0000000000000000000000000000000000000000000000000000000000000000
686 17 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
687 18 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
688 19 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
689 20 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
690 21 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
691 22 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
692 23 application-support 0000000000000000000000000000000000000000000000000000000000000000
693
695 The following options are understood:
696
697 --system
698 Operates on the system systemd instance. This is the implied
699 default.
700
701 --user
702 Operates on the user systemd instance.
703
704 --global
705 Operates on the system-wide configuration for user systemd
706 instance.
707
708 --order, --require
709 When used in conjunction with the dot command (see above), selects
710 which dependencies are shown in the dependency graph. If --order is
711 passed, only dependencies of type After= or Before= are shown. If
712 --require is passed, only dependencies of type Requires=,
713 Requisite=, Wants= and Conflicts= are shown. If neither is passed,
714 this shows dependencies of all these types.
715
716 --from-pattern=, --to-pattern=
717 When used in conjunction with the dot command (see above), this
718 selects which relationships are shown in the dependency graph. Both
719 options require a glob(7) pattern as an argument, which will be
720 matched against the left-hand and the right-hand, respectively,
721 nodes of a relationship.
722
723 Each of these can be used more than once, in which case the unit
724 name must match one of the values. When tests for both sides of the
725 relation are present, a relation must pass both tests to be shown.
726 When patterns are also specified as positional arguments, they must
727 match at least one side of the relation. In other words, patterns
728 specified with those two options will trim the list of edges
729 matched by the positional arguments, if any are given, and fully
730 determine the list of edges shown otherwise.
731
732 --fuzz=timespan
733 When used in conjunction with the critical-chain command (see
734 above), also show units, which finished timespan earlier, than the
735 latest unit in the same level. The unit of timespan is seconds
736 unless specified with a different unit, e.g. "50ms".
737
738 --man=no
739 Do not invoke man(1) to verify the existence of man pages listed in
740 Documentation=.
741
742 --generators
743 Invoke unit generators, see systemd.generator(7). Some generators
744 require root privileges. Under a normal user, running with
745 generators enabled will generally result in some warnings.
746
747 --recursive-errors=MODE
748 Control verification of units and their dependencies and whether
749 systemd-analyze verify exits with a non-zero process exit status or
750 not. With yes, return a non-zero process exit status when warnings
751 arise during verification of either the specified unit or any of
752 its associated dependencies. With no, return a non-zero process
753 exit status when warnings arise during verification of only the
754 specified unit. With one, return a non-zero process exit status
755 when warnings arise during verification of either the specified
756 unit or its immediate dependencies. If this option is not
757 specified, zero is returned as the exit status regardless whether
758 warnings arise during verification or not.
759
760 --root=PATH
761 With cat-files and verify, operate on files underneath the
762 specified root path PATH.
763
764 --image=PATH
765 With cat-files and verify, operate on files inside the specified
766 image path PATH.
767
768 --image-policy=policy
769 Takes an image policy string as argument, as per systemd.image-
770 policy(7). The policy is enforced when operating on the disk image
771 specified via --image=, see above. If not specified defaults to the
772 "*" policy, i.e. all recognized file systems in the image are used.
773
774 --offline=BOOL
775 With security, perform an offline security review of the specified
776 unit files, i.e. does not have to rely on PID 1 to acquire security
777 information for the files like the security verb when used by
778 itself does. This means that --offline= can be used with --root=
779 and --image= as well. If a unit's overall exposure level is above
780 that set by --threshold= (default value is 100), --offline= will
781 return an error.
782
783 --profile=PATH
784 With security --offline=, takes into consideration the specified
785 portable profile when assessing unit settings. The profile can be
786 passed by name, in which case the well-known system locations will
787 be searched, or it can be the full path to a specific drop-in file.
788
789 --threshold=NUMBER
790 With security, allow the user to set a custom value to compare the
791 overall exposure level with, for the specified unit files. If a
792 unit's overall exposure level, is greater than that set by the
793 user, security will return an error. --threshold= can be used with
794 --offline= as well and its default value is 100.
795
796 --security-policy=PATH
797 With security, allow the user to define a custom set of
798 requirements formatted as a JSON file against which to compare the
799 specified unit file(s) and determine their overall exposure level
800 to security threats.
801
802 Table 1. Accepted Assessment Test Identifiers
803 ┌─────────────────────────────────────────────────────────┐
804 │Assessment Test Identifier │
805 ├─────────────────────────────────────────────────────────┤
806 │UserOrDynamicUser │
807 ├─────────────────────────────────────────────────────────┤
808 │SupplementaryGroups │
809 ├─────────────────────────────────────────────────────────┤
810 │PrivateMounts │
811 ├─────────────────────────────────────────────────────────┤
812 │PrivateDevices │
813 ├─────────────────────────────────────────────────────────┤
814 │PrivateTmp │
815 ├─────────────────────────────────────────────────────────┤
816 │PrivateNetwork │
817 ├─────────────────────────────────────────────────────────┤
818 │PrivateUsers │
819 ├─────────────────────────────────────────────────────────┤
820 │ProtectControlGroups │
821 ├─────────────────────────────────────────────────────────┤
822 │ProtectKernelModules │
823 ├─────────────────────────────────────────────────────────┤
824 │ProtectKernelTunables │
825 ├─────────────────────────────────────────────────────────┤
826 │ProtectKernelLogs │
827 ├─────────────────────────────────────────────────────────┤
828 │ProtectClock │
829 ├─────────────────────────────────────────────────────────┤
830 │ProtectHome │
831 ├─────────────────────────────────────────────────────────┤
832 │ProtectHostname │
833 ├─────────────────────────────────────────────────────────┤
834 │ProtectSystem │
835 ├─────────────────────────────────────────────────────────┤
836 │RootDirectoryOrRootImage │
837 ├─────────────────────────────────────────────────────────┤
838 │LockPersonality │
839 ├─────────────────────────────────────────────────────────┤
840 │MemoryDenyWriteExecute │
841 ├─────────────────────────────────────────────────────────┤
842 │NoNewPrivileges │
843 ├─────────────────────────────────────────────────────────┤
844 │CapabilityBoundingSet_CAP_SYS_ADMIN │
845 ├─────────────────────────────────────────────────────────┤
846 │CapabilityBoundingSet_CAP_SET_UID_GID_PCAP │
847 ├─────────────────────────────────────────────────────────┤
848 │CapabilityBoundingSet_CAP_SYS_PTRACE │
849 ├─────────────────────────────────────────────────────────┤
850 │CapabilityBoundingSet_CAP_SYS_TIME │
851 ├─────────────────────────────────────────────────────────┤
852 │CapabilityBoundingSet_CAP_NET_ADMIN │
853 ├─────────────────────────────────────────────────────────┤
854 │CapabilityBoundingSet_CAP_SYS_RAWIO │
855 ├─────────────────────────────────────────────────────────┤
856 │CapabilityBoundingSet_CAP_SYS_MODULE │
857 ├─────────────────────────────────────────────────────────┤
858 │CapabilityBoundingSet_CAP_AUDIT │
859 ├─────────────────────────────────────────────────────────┤
860 │CapabilityBoundingSet_CAP_SYSLOG │
861 ├─────────────────────────────────────────────────────────┤
862 │CapabilityBoundingSet_CAP_SYS_NICE_RESOURCE │
863 ├─────────────────────────────────────────────────────────┤
864 │CapabilityBoundingSet_CAP_MKNOD │
865 ├─────────────────────────────────────────────────────────┤
866 │CapabilityBoundingSet_CAP_CHOWN_FSETID_SETFCAP │
867 ├─────────────────────────────────────────────────────────┤
868 │CapabilityBoundingSet_CAP_DAC_FOWNER_IPC_OWNER │
869 ├─────────────────────────────────────────────────────────┤
870 │CapabilityBoundingSet_CAP_KILL │
871 ├─────────────────────────────────────────────────────────┤
872 │CapabilityBoundingSet_CAP_NET_BIND_SERVICE_BROADCAST_RAW │
873 ├─────────────────────────────────────────────────────────┤
874 │CapabilityBoundingSet_CAP_SYS_BOOT │
875 ├─────────────────────────────────────────────────────────┤
876 │CapabilityBoundingSet_CAP_MAC │
877 ├─────────────────────────────────────────────────────────┤
878 │CapabilityBoundingSet_CAP_LINUX_IMMUTABLE │
879 ├─────────────────────────────────────────────────────────┤
880 │CapabilityBoundingSet_CAP_IPC_LOCK │
881 ├─────────────────────────────────────────────────────────┤
882 │CapabilityBoundingSet_CAP_SYS_CHROOT │
883 ├─────────────────────────────────────────────────────────┤
884 │CapabilityBoundingSet_CAP_BLOCK_SUSPEND │
885 ├─────────────────────────────────────────────────────────┤
886 │CapabilityBoundingSet_CAP_WAKE_ALARM │
887 ├─────────────────────────────────────────────────────────┤
888 │CapabilityBoundingSet_CAP_LEASE │
889 ├─────────────────────────────────────────────────────────┤
890 │CapabilityBoundingSet_CAP_SYS_TTY_CONFIG │
891 ├─────────────────────────────────────────────────────────┤
892 │CapabilityBoundingSet_CAP_BPF │
893 ├─────────────────────────────────────────────────────────┤
894 │UMask │
895 ├─────────────────────────────────────────────────────────┤
896 │KeyringMode │
897 ├─────────────────────────────────────────────────────────┤
898 │ProtectProc │
899 ├─────────────────────────────────────────────────────────┤
900 │ProcSubset │
901 ├─────────────────────────────────────────────────────────┤
902 │NotifyAccess │
903 ├─────────────────────────────────────────────────────────┤
904 │RemoveIPC │
905 ├─────────────────────────────────────────────────────────┤
906 │Delegate │
907 ├─────────────────────────────────────────────────────────┤
908 │RestrictRealtime │
909 ├─────────────────────────────────────────────────────────┤
910 │RestrictSUIDSGID │
911 ├─────────────────────────────────────────────────────────┤
912 │RestrictNamespaces_user │
913 ├─────────────────────────────────────────────────────────┤
914 │RestrictNamespaces_mnt │
915 ├─────────────────────────────────────────────────────────┤
916 │RestrictNamespaces_ipc │
917 ├─────────────────────────────────────────────────────────┤
918 │RestrictNamespaces_pid │
919 ├─────────────────────────────────────────────────────────┤
920 │RestrictNamespaces_cgroup │
921 ├─────────────────────────────────────────────────────────┤
922 │RestrictNamespaces_uts │
923 ├─────────────────────────────────────────────────────────┤
924 │RestrictNamespaces_net │
925 ├─────────────────────────────────────────────────────────┤
926 │RestrictAddressFamilies_AF_INET_INET6 │
927 ├─────────────────────────────────────────────────────────┤
928 │RestrictAddressFamilies_AF_UNIX │
929 ├─────────────────────────────────────────────────────────┤
930 │RestrictAddressFamilies_AF_NETLINK │
931 ├─────────────────────────────────────────────────────────┤
932 │RestrictAddressFamilies_AF_PACKET │
933 ├─────────────────────────────────────────────────────────┤
934 │RestrictAddressFamilies_OTHER │
935 ├─────────────────────────────────────────────────────────┤
936 │SystemCallArchitectures │
937 ├─────────────────────────────────────────────────────────┤
938 │SystemCallFilter_swap │
939 ├─────────────────────────────────────────────────────────┤
940 │SystemCallFilter_obsolete │
941 ├─────────────────────────────────────────────────────────┤
942 │SystemCallFilter_clock │
943 ├─────────────────────────────────────────────────────────┤
944 │SystemCallFilter_cpu_emulation │
945 ├─────────────────────────────────────────────────────────┤
946 │SystemCallFilter_debug │
947 ├─────────────────────────────────────────────────────────┤
948 │SystemCallFilter_mount │
949 ├─────────────────────────────────────────────────────────┤
950 │SystemCallFilter_module │
951 ├─────────────────────────────────────────────────────────┤
952 │SystemCallFilter_raw_io │
953 ├─────────────────────────────────────────────────────────┤
954 │SystemCallFilter_reboot │
955 ├─────────────────────────────────────────────────────────┤
956 │SystemCallFilter_privileged │
957 ├─────────────────────────────────────────────────────────┤
958 │SystemCallFilter_resources │
959 ├─────────────────────────────────────────────────────────┤
960 │IPAddressDeny │
961 ├─────────────────────────────────────────────────────────┤
962 │DeviceAllow │
963 ├─────────────────────────────────────────────────────────┤
964 │AmbientCapabilities │
965 └─────────────────────────────────────────────────────────┘
966 See example "JSON Policy" below.
967
968 --json=MODE
969 With the security command, generate a JSON formatted output of the
970 security analysis table. The format is a JSON array with objects
971 containing the following fields: set which indicates if the setting
972 has been enabled or not, name which is what is used to refer to the
973 setting, json_field which is the JSON compatible identifier of the
974 setting, description which is an outline of the setting state, and
975 exposure which is a number in the range 0.0...10.0, where a higher
976 value corresponds to a higher security threat. The JSON version of
977 the table is printed to standard output. The MODE passed to the
978 option can be one of three: off which is the default, pretty and
979 short which respectively output a prettified or shorted JSON
980 version of the security table. With the plot command, generate a
981 JSON formatted output of the raw time data. The format is a JSON
982 array with objects containing the following fields: name which is
983 the unit name, activated which is the time after startup the
984 service was activated, activating which is how long after startup
985 the service was initially started, time which is how long the
986 service took to activate from when it was initially started,
987 deactivated which is the time after startup that the service was
988 deactivated, deactivating which is the time after startup that the
989 service was initially told to deactivate.
990
991 --iterations=NUMBER
992 When used with the calendar command, show the specified number of
993 iterations the specified calendar expression will elapse next.
994 Defaults to 1.
995
996 --base-time=TIMESTAMP
997 When used with the calendar command, show next iterations relative
998 to the specified point in time. If not specified defaults to the
999 current time.
1000
1001 --unit=UNIT
1002 When used with the condition command, evaluate all the
1003 Condition*=... and Assert*=... assignments in the specified unit
1004 file. The full unit search path is formed by combining the
1005 directories for the specified unit with the usual unit load paths.
1006 The variable $SYSTEMD_UNIT_PATH is supported, and may be used to
1007 replace or augment the compiled in set of unit load paths; see
1008 systemd.unit(5). All units files present in the directory
1009 containing the specified unit will be used in preference to the
1010 other paths.
1011
1012 --table
1013 When used with the plot command, the raw time data is output in a
1014 table.
1015
1016 --no-legend
1017 When used with the plot command in combination with either --table
1018 or --json=, no legends or hints are included in the output.
1019
1020 -H, --host=
1021 Execute the operation remotely. Specify a hostname, or a username
1022 and hostname separated by "@", to connect to. The hostname may
1023 optionally be suffixed by a port ssh is listening on, separated by
1024 ":", and then a container name, separated by "/", which connects
1025 directly to a specific container on the specified host. This will
1026 use SSH to talk to the remote machine manager instance. Container
1027 names may be enumerated with machinectl -H HOST. Put IPv6 addresses
1028 in brackets.
1029
1030 -M, --machine=
1031 Execute operation on a local container. Specify a container name to
1032 connect to, optionally prefixed by a user name to connect as and a
1033 separating "@" character. If the special string ".host" is used in
1034 place of the container name, a connection to the local system is
1035 made (which is useful to connect to a specific user's user bus:
1036 "--user --machine=lennart@.host"). If the "@" syntax is not used,
1037 the connection is made as root user. If the "@" syntax is used
1038 either the left hand side or the right hand side may be omitted
1039 (but not both) in which case the local user name and ".host" are
1040 implied.
1041
1042 --quiet
1043 Suppress hints and other non-essential output.
1044
1045 -h, --help
1046 Print a short help text and exit.
1047
1048 --version
1049 Print a short version string and exit.
1050
1051 --no-pager
1052 Do not pipe output into a pager.
1053
1055 For most commands, 0 is returned on success, and a non-zero failure
1056 code otherwise.
1057
1058 With the verb compare-versions, in the two-argument form, 12, 0, 11 is
1059 returned if the second version string is respectively larger, equal, or
1060 smaller to the first. In the three-argument form, 0 or 1 if the
1061 condition is respectively true or false.
1062
1064 $SYSTEMD_LOG_LEVEL
1065 The maximum log level of emitted messages (messages with a higher
1066 log level, i.e. less important ones, will be suppressed). Either
1067 one of (in order of decreasing importance) emerg, alert, crit, err,
1068 warning, notice, info, debug, or an integer in the range 0...7. See
1069 syslog(3) for more information.
1070
1071 $SYSTEMD_LOG_COLOR
1072 A boolean. If true, messages written to the tty will be colored
1073 according to priority.
1074
1075 This setting is only useful when messages are written directly to
1076 the terminal, because journalctl(1) and other tools that display
1077 logs will color messages based on the log level on their own.
1078
1079 $SYSTEMD_LOG_TIME
1080 A boolean. If true, console log messages will be prefixed with a
1081 timestamp.
1082
1083 This setting is only useful when messages are written directly to
1084 the terminal or a file, because journalctl(1) and other tools that
1085 display logs will attach timestamps based on the entry metadata on
1086 their own.
1087
1088 $SYSTEMD_LOG_LOCATION
1089 A boolean. If true, messages will be prefixed with a filename and
1090 line number in the source code where the message originates.
1091
1092 Note that the log location is often attached as metadata to journal
1093 entries anyway. Including it directly in the message text can
1094 nevertheless be convenient when debugging programs.
1095
1096 $SYSTEMD_LOG_TID
1097 A boolean. If true, messages will be prefixed with the current
1098 numerical thread ID (TID).
1099
1100 Note that the this information is attached as metadata to journal
1101 entries anyway. Including it directly in the message text can
1102 nevertheless be convenient when debugging programs.
1103
1104 $SYSTEMD_LOG_TARGET
1105 The destination for log messages. One of console (log to the
1106 attached tty), console-prefixed (log to the attached tty but with
1107 prefixes encoding the log level and "facility", see syslog(3), kmsg
1108 (log to the kernel circular log buffer), journal (log to the
1109 journal), journal-or-kmsg (log to the journal if available, and to
1110 kmsg otherwise), auto (determine the appropriate log target
1111 automatically, the default), null (disable log output).
1112
1113 $SYSTEMD_LOG_RATELIMIT_KMSG
1114 Whether to ratelimit kmsg or not. Takes a boolean. Defaults to
1115 "true". If disabled, systemd will not ratelimit messages written to
1116 kmsg.
1117
1118 $SYSTEMD_PAGER
1119 Pager to use when --no-pager is not given; overrides $PAGER. If
1120 neither $SYSTEMD_PAGER nor $PAGER are set, a set of well-known
1121 pager implementations are tried in turn, including less(1) and
1122 more(1), until one is found. If no pager implementation is
1123 discovered no pager is invoked. Setting this environment variable
1124 to an empty string or the value "cat" is equivalent to passing
1125 --no-pager.
1126
1127 Note: if $SYSTEMD_PAGERSECURE is not set, $SYSTEMD_PAGER (as well
1128 as $PAGER) will be silently ignored.
1129
1130 $SYSTEMD_LESS
1131 Override the options passed to less (by default "FRSXMK").
1132
1133 Users might want to change two options in particular:
1134
1135 K
1136 This option instructs the pager to exit immediately when Ctrl+C
1137 is pressed. To allow less to handle Ctrl+C itself to switch
1138 back to the pager command prompt, unset this option.
1139
1140 If the value of $SYSTEMD_LESS does not include "K", and the
1141 pager that is invoked is less, Ctrl+C will be ignored by the
1142 executable, and needs to be handled by the pager.
1143
1144 X
1145 This option instructs the pager to not send termcap
1146 initialization and deinitialization strings to the terminal. It
1147 is set by default to allow command output to remain visible in
1148 the terminal even after the pager exits. Nevertheless, this
1149 prevents some pager functionality from working, in particular
1150 paged output cannot be scrolled with the mouse.
1151
1152 See less(1) for more discussion.
1153
1154 $SYSTEMD_LESSCHARSET
1155 Override the charset passed to less (by default "utf-8", if the
1156 invoking terminal is determined to be UTF-8 compatible).
1157
1158 $SYSTEMD_PAGERSECURE
1159 Takes a boolean argument. When true, the "secure" mode of the pager
1160 is enabled; if false, disabled. If $SYSTEMD_PAGERSECURE is not set
1161 at all, secure mode is enabled if the effective UID is not the same
1162 as the owner of the login session, see geteuid(2) and
1163 sd_pid_get_owner_uid(3). In secure mode, LESSSECURE=1 will be set
1164 when invoking the pager, and the pager shall disable commands that
1165 open or create new files or start new subprocesses. When
1166 $SYSTEMD_PAGERSECURE is not set at all, pagers which are not known
1167 to implement secure mode will not be used. (Currently only less(1)
1168 implements secure mode.)
1169
1170 Note: when commands are invoked with elevated privileges, for
1171 example under sudo(8) or pkexec(1), care must be taken to ensure
1172 that unintended interactive features are not enabled. "Secure" mode
1173 for the pager may be enabled automatically as describe above.
1174 Setting SYSTEMD_PAGERSECURE=0 or not removing it from the inherited
1175 environment allows the user to invoke arbitrary commands. Note that
1176 if the $SYSTEMD_PAGER or $PAGER variables are to be honoured,
1177 $SYSTEMD_PAGERSECURE must be set too. It might be reasonable to
1178 completely disable the pager using --no-pager instead.
1179
1180 $SYSTEMD_COLORS
1181 Takes a boolean argument. When true, systemd and related utilities
1182 will use colors in their output, otherwise the output will be
1183 monochrome. Additionally, the variable can take one of the
1184 following special values: "16", "256" to restrict the use of colors
1185 to the base 16 or 256 ANSI colors, respectively. This can be
1186 specified to override the automatic decision based on $TERM and
1187 what the console is connected to.
1188
1189 $SYSTEMD_URLIFY
1190 The value must be a boolean. Controls whether clickable links
1191 should be generated in the output for terminal emulators supporting
1192 this. This can be specified to override the decision that systemd
1193 makes based on $TERM and other conditions.
1194
1196 Example 25. JSON Policy
1197
1198 The JSON file passed as a path parameter to --security-policy= has a
1199 top-level JSON object, with keys being the assessment test identifiers
1200 mentioned above. The values in the file should be JSON objects with one
1201 or more of the following fields: description_na (string),
1202 description_good (string), description_bad (string), weight (unsigned
1203 integer), and range (unsigned integer). If any of these fields
1204 corresponding to a specific id of the unit file is missing from the
1205 JSON object, the default built-in field value corresponding to that
1206 same id is used for security analysis as default. The weight and range
1207 fields are used in determining the overall exposure level of the unit
1208 files: the value of each setting is assigned a badness score, which is
1209 multiplied by the policy weight and divided by the policy range to
1210 determine the overall exposure that the setting implies. The computed
1211 badness is summed across all settings in the unit file, normalized to
1212 the 1...100 range, and used to determine the overall exposure level of
1213 the unit. By allowing users to manipulate these fields, the 'security'
1214 verb gives them the option to decide for themself which ids are more
1215 important and hence should have a greater effect on the exposure level.
1216 A weight of "0" means the setting will not be checked.
1217
1218 {
1219 "PrivateDevices":
1220 {
1221 "description_good": "Service has no access to hardware devices",
1222 "description_bad": "Service potentially has access to hardware devices",
1223 "weight": 1000,
1224 "range": 1
1225 },
1226 "PrivateMounts":
1227 {
1228 "description_good": "Service cannot install system mounts",
1229 "description_bad": "Service may install system mounts",
1230 "weight": 1000,
1231 "range": 1
1232 },
1233 "PrivateNetwork":
1234 {
1235 "description_good": "Service has no access to the host's network",
1236 "description_bad": "Service has access to the host's network",
1237 "weight": 2500,
1238 "range": 1
1239 },
1240 "PrivateTmp":
1241 {
1242 "description_good": "Service has no access to other software's temporary files",
1243 "description_bad": "Service has access to other software's temporary files",
1244 "weight": 1000,
1245 "range": 1
1246 },
1247 "PrivateUsers":
1248 {
1249 "description_good": "Service does not have access to other users",
1250 "description_bad": "Service has access to other users",
1251 "weight": 1000,
1252 "range": 1
1253 }
1254 }
1255
1256
1258 systemd(1), systemctl(1)
1259
1261 1. Packaging Metadata
1262 https://systemd.io/COREDUMP_PACKAGE_METADATA/
1263
1264 2. Discoverable Partitions Specification
1265 https://uapi-group.org/specifications/specs/discoverable_partitions_specification
1266
1267
1268
1269systemd 254 SYSTEMD-ANALYZE(1)