一、查看重啓記錄spa
last reboot命令code
[root@test ~]# last reboot reboot system boot 2.6.32-431.el6.x Mon May 21 16:32 - 15:06 (1+22:33) reboot system boot 2.6.32-431.el6.x Wed May 16 18:40 - 15:06 (6+20:25) reboot system boot 2.6.32-431.el6.x Wed May 2 16:44 - 15:06 (20+22:22) reboot system boot 2.6.32-431.el6.x Fri Mar 2 18:47 - 15:06 (81+20:18) reboot system boot 2.6.32-431.el6.x Sun Feb 11 17:56 - 15:06 (100+21:09) reboot system boot 2.6.32-431.el6.x Fri Dec 22 18:24 - 15:06 (151+20:41)
二、查看用戶登陸記錄blog
[root@hch ~]# last -a root pts/1 Mon May 21 16:29 still logged in 10.x.x.x root pts/0 Mon May 21 08:36 still logged in 10.x.x.x reboot system boot Mon May 21 16:32 - 15:07 (1+22:34) 2.6.32-431.el6.x86_64 root pts/1 Thu May 17 14:06 - crash (4+02:26) 10.x.x.x root pts/0 Wed May 16 10:50 - crash (5+05:42) 10.x.x.x
參數說明
-a 把從何處登入系統的主機名稱或IP地址,顯示在最後一行。
-d 將IP地址轉換成主機名稱。
-f 指定記錄文件。
-n 或- 設置列出名單的顯示列數。
-R 不顯示登入系統的主機名稱或IP地址。
-x 顯示系統關機,從新開機,以及執行等級的改變等信息ast