How to display boot times...

Chat about anything related to Linux Mint
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Post Reply
midigark
Level 2
Level 2
Posts: 70
Joined: Sat Nov 05, 2022 2:28 pm
Location: 60 NW of Chicago, IL USA

How to display boot times...

Post by midigark »

Hello all,
A curious point after this mornings 5.15.0-101-generic kernel update:

I noticed what seemed to be a faster boot. It could be my imagination or some silly thing like that.
But, then I wondered, how would I even know? Of course, for the answer to anything, search the WWW.
info found on vitux.com (link at the bottom).

To get the current "boot time", which I believe would be from loading the kernel to login prompt, open a terminal and try this:

$ systemd-analyze

You can do the obvious --help and so on, but what you really want to do is:

$ systemd-analyze plot > ~/Pictures/systemd.svg

Then you can view the saved graphical explanation of who, did what, with which and for how long, using the standard Xviewer or graphical viewer of your choosing. You should end up with a nice graph that looks something like this:
Screenshot from 2024-03-18 09-48-44.png
Screenshot from 2024-03-18 09-48-44.png (60.38 KiB) Viewed 246 times
Remember to zoom in. At 8507 x 8470, mine is quite readable, once you zoom in enough.
Even my abysmal times revealed that it was a faster boot.
Leaving me to wonder, what the heck just happened? :lol:

Anyway, have fun and I hope someone finds this informative, helpful or just a little fun.
*
You can see the entire article about this feature, here:
https://vitux.com/how-long-does-your-li ... e-to-boot/
September 23, 2020 by Karim Buzdar
In the full article, it explains the various options, how each is helpful and suggestions for what to do if you are looking to speed things up.

Standard disclaimer: If you do make any changes, neither the author of the original article or I are responsible if you blow it up.

Which is why I only presented the two simplest usages. :!:
peace
Mark

p.s. Since I don't recall ever installing systemd-analyze, I assume it is part of the most Linux distros.
Mark

5.15.0-102-generic
Cinnamon 6.0.4
Linux Mint 21.3
CROSSHAIR V FORMULA-Z / BIOS: 2201
FX-6300 3.56 GHz
G.SKILL 16GB
RTX 2070 SUPER
Re - 4TB
Blue - 2TB
HP V244h (2)
G15
G633
M65 Pro RGB Mouse
Intel 82583V Network 1000 Mbps
ASUS USB-BT500 (Bluetooth)
User avatar
senjoz
Level 5
Level 5
Posts: 902
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: How to display boot times...

Post by senjoz »

midigark wrote: Mon Mar 18, 2024 11:44 am I noticed what seemed to be a faster boot. It could be my imagination or some silly thing like that.
To check history of boot times run next terminal command:
journalctl | grep userspace | grep kernel
midigark
Level 2
Level 2
Posts: 70
Joined: Sat Nov 05, 2022 2:28 pm
Location: 60 NW of Chicago, IL USA

Re: How to display boot times...

Post by midigark »

Thanks for the reply and a way to check historical boot times.

It seems I was right.

Mar 05 11:28:36 - Startup finished in 10.874s (kernel) + 2min 17.665s (userspace) = 2min 28.540s.
Mar 07 19:08:30 - Startup finished in 10.679s (kernel) + 2min 17.261s (userspace) = 2min 27.940s.
Mar 17 21:38:17 - Startup finished in 28.362s (kernel) + 2min 24.306s (userspace) = 2min 52.668s.
Mar 18 04:41:16 - Startup finished in 51.394s (kernel) + 2min 44.712s (userspace) = 3min 36.107s.

(I moved some devices and removed the webcam)
Mar 18 09:17:00 - Startup finished in 16.026s (kernel) + 1min 8.244s (userspace) = 1min 24.270s.

(1st boot after the 5.15.0-101 kernel update)
Mar 18 14:12:03 - Startup finished in 13.057s (kernel) + 1min 13.202s (userspace) = 1min 26.260s.

(2nd boot after the kernel update)

About 42% faster. :shock:
:D

Now I wonder if it was the Web Cam init that took another full minute. :roll:

Perhaps someone else noticed a faster boot time...
Thanks again!
Mark
Mark

5.15.0-102-generic
Cinnamon 6.0.4
Linux Mint 21.3
CROSSHAIR V FORMULA-Z / BIOS: 2201
FX-6300 3.56 GHz
G.SKILL 16GB
RTX 2070 SUPER
Re - 4TB
Blue - 2TB
HP V244h (2)
G15
G633
M65 Pro RGB Mouse
Intel 82583V Network 1000 Mbps
ASUS USB-BT500 (Bluetooth)
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How to display boot times...

Post by SMG »

Whenever someone is having slow boot issues, I recommend running the following to see what might be causing a slow down.

Code: Select all

systemd-analyze

Code: Select all

systemd-analyze critical-chain

Code: Select all

systemd-analyze blame
Image
A woman typing on a laptop with LM20.3 Cinnamon.
wwblm
Level 4
Level 4
Posts: 210
Joined: Fri Mar 05, 2021 3:11 pm

Re: How to display boot times...

Post by wwblm »

senjoz wrote: Mon Mar 18, 2024 1:20 pm To check history of boot times run next terminal command:
journalctl | grep userspace | grep kernel[/c]
Thanks for that! Really interesting. Whenever update manager tells me to reboot I do. Sometimes I just reboot to clear everything out. I'm kind of guessing here but I think when the update manger asks for a reboot (Likely Kernel update?) it takes about 20 seconds longer than typical. The history for me was 84 boot times. The fell into two groups. They were typically between 36 and 39 seconds or between 53 and 57 seconds. Very little outside of those bounds.

Used another recent tip to plant that in my history as for some reason the journalctl is not stored in history buffer or file?
Post Reply

Return to “Chat about Linux Mint”