Wednesday, February 15, 2017

How to check history of user logins and reboot history ?



How to check when system was rebooted ?

#last | grep -i reboot

[root@linuxtechnotes ~]#
[root@linuxtechnotes ~]# last | grep -i reboot
reboot   system boot  2.6.32-504.el6.i Fri Feb 10 14:02 - 21:10 (5+07:08)
reboot   system boot  2.6.32-504.el6.i Sat Feb  4 06:25 - 21:10 (11+14:45)
reboot   system boot  2.6.32-504.el6.i Thu Feb  2 08:15 - 21:10 (13+12:55)
reboot   system boot  2.6.32-504.el6.i Sun Jan 29 02:42 - 21:10 (17+18:28)
[root@linuxtechnotes ~]#
[root@linuxtechnotes ~]#


How to check history of server who are all logined with time and date ?

#last 

[root@linuxtechnotes ~]# last | tail -10
root     pts/1        192.168.150.1    Thu Feb  2 16:26 - 19:22  (02:55)
root     pts/0        :0.0             Thu Feb  2 16:22 - crash (1+14:02)
root     tty1         :0               Thu Feb  2 16:22 - crash (1+14:03)
reboot   system boot  2.6.32-504.el6.i Thu Feb  2 08:15 - 21:11 (13+12:55)
root     pts/1        192.168.150.1    Sun Jan 29 20:57 - 21:45  (00:48)
linuxtec pts/0        :0.0             Sun Jan 29 15:36 - crash (3+16:39)
linuxtec tty1         :0               Sun Jan 29 15:35 - crash (3+16:39)
reboot   system boot  2.6.32-504.el6.i Sun Jan 29 02:42 - 21:11 (17+18:28)

wtmp begins Sun Jan 29 02:42:35 2017
[root@linuxtechnotes ~]#




No comments:

Post a Comment