Frequently Asked Question

How do I diagnose a slow boot with systemd-analyze?

systemd-analyze by itself prints a one-line summary of how long the last boot took, broken down into firmware, loader, kernel, and userspace. systemd-analyze blame sorts every unit by how long it took to start, longest first, usually the most useful starting point. Be a little careful interpreting the output: a unit at the top may be slow simply because it waits on another, not because it is doing real work. systemd-analyze critical-chain shows the longest dependency chain instead, which often pinpoints the real bottleneck.

For a visual overview, systemd-analyze plot > boot.svg produces a Gantt-style chart of every unit. systemd-analyze verify some.service checks a unit file for syntax mistakes before you enable it, and systemd-analyze security some.service scores its sandboxing hardening. Together they make systemd-analyze one of the most useful diagnostic commands a sysadmin has.

Video

Further reading and video