After a kernel update the server was rebooted, and it answered over SSH noticeably later than usual. A colleague asks: how long did the boot take, and what was it waiting for? Reboot your machine — it is set up the same way — and look.
Look at the machine's boot
Reboot the machine with sudo reboot: the terminal shows the boot and logs in again. Then look at how long the boot took, which units took longest to start and which units the boot went through to the end.
First, predict
The boot took longer than usual. What will be the first line of systemd-analyze blame — the slowest unit?
Now start the exercise, run the command and compare your prediction with the output.
systemd-analyze says multi-user.target reached after 12.450s in userspace, and the first line of critical-chain is multi-user.target @12.450s. What follows from this?
-
The end of the boot is exactly the moment the boot reached the target: both outputs name it with one number.
-
How long a unit took to start, critical-chain writes after
+. After@comes the moment the unit became active.
Both numbers are the moment the boot reached multi-user.target.