↑ ↓ select, Enter open, Esc close

Analyze boot time and find slow services

user@server
systemd-analyze && systemd-analyze blame --no-pager | head -20

systemd-analyze prints how long the kernel and userspace took during the last boot, and blame lists services by their startup time. Useful when a server stays unreachable for a long time after a restart. A single service with a very high time is often waiting for a network drive or a timeout.

Note: Long startup times do not always mean a delay, because many services start in parallel. systemd-analyze critical-chain shows the chain that actually holds things up.

Also searched as

  • why is the server booting so slowly
  • measure boot time linux
  • which service slows down startup
  • systemd-analyze blame

Related one-liners

All in systemd

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.