Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 367  / 2 Years ago, sat, october 8, 2022, 4:55:20

I am trying to find the boot time of Ubuntu.



The following tells me that my last reboot took 1 minutes 39 second.



$ last reboot
reboot system boot 3.8.0-29-generic Wed Jan 8 14:55 - 16:35 (01:39)
reboot system boot 3.8.0-29-generic Wed Jan 8 14:38 - 14:55 (00:16)
reboot system boot 3.8.0-29-generic Wed Jan 8 14:27 - 14:38 (00:10)
reboot system boot 3.8.0-29-generic Wed Jan 8 11:07 - 14:27 (03:19)
reboot system boot 3.8.0-29-generic Wed Jan 8 00:03 - 00:31 (00:27)
reboot system boot 3.8.0-29-generic Tue Jan 7 10:39 - 14:22 (03:43)
reboot system boot 3.8.0-29-generic Mon Jan 6 10:51 - 18:42 (07:50)
reboot system boot 3.8.0-29-generic Sun Jan 5 22:08 - 00:19 (02:11)
reboot system boot 3.8.0-29-generic Sat Jan 4 11:34 - 15:47 (04:12)


While when I looked at dmesg:



[   14.707210] type=1400 audit(1389173157.301:11): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1018 comm="apparmor_parser"


This shows that the total boot time is 14.707210. So as per the above two methods which is the actual boot time?


More From » boot

 Answers
6

The first command, last reboot, does not tell you the boot time. It tells you at what times your system was running. For example, the first entry tells you that your system has been running from 14:55 to 16:35 on Wed 8. That's 1 hour and 39 minutes. It did not take your system 1 hour and 39 minutes to boot - hopefully ;)



The second command, dmesg, brings you closer to what you want to know, but since dmesg will continually output more system events while your system is running, it's not the tool of choice to measure boot time either.



If you really want to reliably measure your system boot time, I would recommend a tool such as bootchart.



See here:
https://wiki.ubuntu.com/BootCharting


[#27596] Saturday, October 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ilityushing

Total Points: 18
Total Questions: 100
Total Answers: 113

Location: Senegal
Member since Wed, May 13, 2020
4 Years ago
;