Show uptime and recent reboots
when was the server rebooted | how long has the server been up | unexpected reboot linux | uptime | last | rebootuptime -p && last reboot | head -n 10The first line gives the uptime in words, for example up 3 weeks, 2 days. Below it follow the most recent boots from /var/log/wtmp with kernel version and time span. A boot without a preceding clean shutdown points to a power failure, a crash or a restart by the hosting provider.
Note: The list only goes back as far as logrotate keeps wtmp. The cause of a crash can often be found with journalctl -b -1.
Also searched as
- when was the server rebooted
- how long has the server been up
- unexpected reboot linux