This morning, colleagues were checking the cause of the abnormal restart of a test machine last night,
Unfortunately, the IPMI sel is full, with no record of the final condition, only under the system.
Query system restart via last reboot
[Email protected] home]# last reboot
Reboot system boot 2.6.32-279.el6.x Mon Nov 9 11:50-08:34 (78+20:57)
Reboot system boot 2.6.32-279.el6.x Wed Oct 21 12:33-08:34 (97+20:01)
Reboot system boot 2.6.32-279.el6.x Mon Oct 5 08:24-12:32 (16+04:07)
Reboot system boot 2.6.32-279.el6.x Mon Oct 5 08:18-08:24 (00:05)
Reboot system boot 2.6.32-279.el6.x Mon May 4 08:12-17:13 (144+09:01)
Reboot system boot 2.6.32-279.el6.x Sat Mar 7 08:09-08:06 (57+23:57)
Reboot system boot 2.6.32-279.el6.x Fri Mar 6 16:03-08:08 (16:05)
Reboot system boot 2.6.32-279.el6.x Thu Feb 26 15:18-16:02 (8+00:44)
Reboot system boot 2.6.32-279.el6.x Thu Feb 26 08:09-15:17 (07:08)
Reboot system boot 2.6.32-279.el6.x Mon Oct 13 09:20-17:15 (123+07:54)
Reboot system boot 2.6.32-279.el6.x Sat Oct 11 16:24-17:15 (125+00:50)
Reboot system boot 2.6.32-279.el6.x Mon Oct 6 08:13-17:15 (130+09:01)
Reboot system boot 2.6.32-279.el6.x Thu June 5 08:20-17:07 (117+08:46)
Reboot system boot 2.6.32-279.el6.x Wed June 4 19:57-08:19 (12:22)
Reboot system boot 2.6.32-279.el6.x Wed June 4 19:48-19:56 (00:07)
Reboot system boot 2.6.32-279.el6.x Wed June 4 19:28-19:48 (00:19)
Reboot system boot 2.6.32-279.el6.x Wed June 4 19:25-19:26 (00:01)
Wtmp begins Wed June 4 19:25:43 2014
Last line
Wtmp begins Wed June 4 19:25:43 2014
The description file was generated from January 4, 2014 and is basically the date the system was installed
The next line looks up, and the time behind the parentheses represents the system run time (78+20:57), and you can see that the last 78 days have elapsed
-F parameter Print full times and dates
Confirm the startup time by uptime, it's consistent.
[[email protected] home] #uptime
08:47:33 up + days, 20:57, 3 users, load average:0.05, 0.05, 0.00
Now that you've talked about it, find out more about the command.
The W command Show who's logged on and what they is doing. How long can I see the up?
Uptime command tell how long the system has been running.//can directly see how much up
The top command display Linux tasks.//can directly see how long
Who command show who's logged on//
Who-b View the last time the system started.
System Boot 2015-11-09 11:50
LASTB Viewing failed Logins
The last command successfully logged in with a record, and the LASTB command logs a failed login attempt.
View Linux system runtime and restart time