Way to tell how many times the computer has rebooted in a 24 hour period

crashlogsreboot

I was doing a 24 hour code-a-thon and had to reboot numerous times and was wondering if there was a way to tell exactly how many the computer was rebooted or crashed.

Best Answer

System reboots are usually logged in the binary file /var/log/wtmp. The easiest way to read that file is using the last command which prints lines like this for every reboot:

reboot   system boot  3.10-3-amd64     Fri May  2 19:30 - 21:02 (5+01:32)   

so if you issue last reboot, you'll get a list of all reboots logged to your wtmp file.

Related Question