want to know about "last" command
Code:
reboot system boot 2.6.32-358.el6.x Mon Feb 3 09:27 - 11:32 (02:05) |
This line says about the last reboot of your system and this output was possibly generated using cmd last reboot. However, as last commands's manual says, it gives a list of last logged in users. Moreover, by using cmd line options, other info. can also be retrieved. Check out man page.
|
Quote:
|
Explain your question little more and before asking, mention that what cmd you had invoked which producted above result? However, to know last reboot time, you can try following cmds:
Code:
user@system~$ who -b |
Quote:
I want to know when it was down and at what time it came up. and reason for that. and how it was done automatically. |
Alright, in that case you should check system logs on that particular time. You can check under /var/log/messages. BTW, which system/OS it is?
|
Quote:
I have added output of last command. Quote:
|
Quote:
Second, how can you say that you won't get anything in /var/log/messages? Did you check other log files like /var/log/syslog or cmd like dmesg? On the other hand, when you know the reason for reboot (tripping the ups), then why you need to find it in log files? Also, did you read manual of last cmd and analyzed log files? I guess, your senior wants you to learn things instead of asking people to give you a readymade solution. So, as said, before asking same thing again and again, read man pages and log files or dig over Internet. It will help you. |
Quote:
Code:
Feb 1 23:46:25 localhost kernel: type=1305 audit(1391278585.393:56542): audit_pid=0 old=3043 auid=4294967295 ses=4294967295 subj=system_u:system_r:auditd_t:s0 res=1 In dmesg how can i be sure about the problem because it builts when system boots. and it doesn't show the timing also. |
All times are GMT -5. The time now is 09:14 AM. |