查看启动时间总览
systemd-analyze
输出
Startup finished in 3.403s (kernel) + 7.124s (userspace) = 10.528s
列出各个服务的启动时间
systemd-analyze blame
输出
4.512s NetworkManager.service
2.345s plymouth-quit-wait.service
1.234s systemd-logind.service
1.023s bluetooth.service
...
显示关键路径分析
systemd-analyze critical-chain
输出
graphical.target @10.438s
└─multi-user.target @10.438s
└─NetworkManager.service @5.426s +4.512s
└─dbus.service @4.234s +1.192s
└─basic.target @4.234s
└─sockets.target @4.234s
└─dbus.socket @4.234s
└─sysinit.target @4.234s
└─systemd-update-done.service @3.234s +1s
└─ldconfig.service @2.234s +1s
└─local-fs.target @2.234s
└─boot.mount @1.234s +1s
└─systemd-fsck@dev-disk-by\x2duuid-xxxxxxx.service @1.234s +1s
└─local-fs-pre.target @1.234s
└─systemd-tmpfiles-setup.service @1.234s +1s
└─systemd-journal-flush.service @1.234s +1s
└─systemd-journald.service @1.234s +1s
└─systemd-journald.socket @1.234s
└─-.mount @1.234s
└─system.slice @1.234s
└─-.slice @1.234s
生成启动图
systemd-analyze plot > startup.svg