2016-04-10 06:36:11 +08:00
|
|
|
# systemd-analyze
|
|
|
|
|
2021-10-23 21:16:31 +02:00
|
|
|
> Analyze and debug system manager.
|
2016-04-10 06:36:11 +08:00
|
|
|
> Show timing details about the boot process of units (services, mount points, devices, sockets).
|
2023-05-16 15:08:05 +02:00
|
|
|
> More information: <https://www.freedesktop.org/software/systemd/man/systemd-analyze.html>.
|
2016-04-10 06:36:11 +08:00
|
|
|
|
2025-01-17 10:57:49 +02:00
|
|
|
- Print the last system startup time:
|
|
|
|
|
|
|
|
`systemd-analyze`
|
|
|
|
|
2023-05-16 15:08:05 +02:00
|
|
|
- List all running units, ordered by the time they took to initialize:
|
2016-04-10 06:36:11 +08:00
|
|
|
|
|
|
|
`systemd-analyze blame`
|
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Print a tree of the time-critical chain of units:
|
2016-04-10 06:36:11 +08:00
|
|
|
|
|
|
|
`systemd-analyze critical-chain`
|
2021-04-18 17:28:12 +02:00
|
|
|
|
|
|
|
- Create an SVG file showing when each system service started, highlighting the time that they spent on initialization:
|
|
|
|
|
|
|
|
`systemd-analyze plot > {{path/to/file.svg}}`
|
|
|
|
|
|
|
|
- Plot a dependency graph and convert it to an SVG file:
|
|
|
|
|
2025-03-17 23:17:57 +02:00
|
|
|
`systemd-analyze dot | dot -T {{svg}} > {{path/to/file.svg}}`
|
2021-10-23 21:16:31 +02:00
|
|
|
|
|
|
|
- Show security scores of running units:
|
|
|
|
|
|
|
|
`systemd-analyze security`
|