systemd-analyze – analyze system boot-up performance

systemd analyze command
systemd analyze command

systemd-analyze provides boot performance analysis and debugging tools for systemd systems.

Synopsis

systemd-analyze [COMMAND]

Examples

Boot time summary

$ systemd-analyze
Startup finished in 2.345s (kernel) + 5.678s (userspace) = 8.023s
graphical.target reached after 5.432s in userspace

Blame (slowest units)

$ systemd-analyze blame
5.123s NetworkManager-wait-online.service
2.456s snapd.service
1.234s docker.service
0.987s systemd-udev-settle.service
...

Critical chain

$ systemd-analyze critical-chain
graphical.target @5.432s
└─multi-user.target @5.431s
  └─docker.service @4.197s +1.234s
    └─network-online.target @4.196s
      └─NetworkManager-wait-online.service @1.234s +2.962s

Plot to SVG

$ systemd-analyze plot > boot.svg

Verify unit files

$ systemd-analyze verify /etc/systemd/system/myservice.service

Security analysis

$ systemd-analyze security nginx.service

Common Patterns

Find boot bottlenecks

$ systemd-analyze blame | head -10

Check service dependencies

$ systemd-analyze critical-chain nginx.service

Optimize boot time

  1. Check blame for slow services
  2. Disable unnecessary services: systemctl disable service
  3. Check critical-chain for dependencies

Tips

  • Disable slow services: If not needed at boot
  • Plot is visual: Generate SVG for detailed view
  • Security check: Audit service sandboxing
  • Verify units: Check syntax before enabling

See Also

Tutorials