Quote:
Originally Posted by pinga123
My Linux system was last rebooted few hours ago.
But it seems little confusing for me to figure out the exact reason behind it.
I guess following command should justify what i meant to say.
Code:
# date
Wed May 11 13:22:49 IST 2011
# last | grep "May 10"
reboot system boot 2.6.18-194.el5 Tue May 10 17:35 (19:46)
root pts/1 XXXX Tue May 10 17:24 - 18:18 (00:53)
# last | grep "May 11"
oracle pts/2 XXX Wed May 11 13:08 still logged in
root pts/1 XXX Wed May 11 13:07 still logged in
root pts/0 XXX Wed May 11 13:00 still logged in
root pts/5 XXX Wed May 11 12:59 - 12:59 (00:00)
root pts/4 XXX Wed May 11 12:58 - 12:59 (00:00)
oracle pts/3 XXX Wed May 11 12:44 still logged in
root pts/2 XXXX Wed May 11 12:42 - 12:59 (00:16)
root pts/1 XXX Wed May 11 12:41 - 12:59 (00:18)
root pts/0 XXXX Wed May 11 12:38 - 12:59 (00:20)
# uptime
13:22:40 up 47 min, 4 users, load average: 1.23, 2.48, 2.66
# who -b
system boot 2011-05-10 17:35
You can see the current system date is Wed May 11 13:22:49 IST 2011
|
I am not sure if you have pasted the output correctly because I ran the commands that you have mentioned here on my RHEL as well as Linux Mint system and it is showing up the correct time.
Apart from that your system is showing as up from 19 hours 46 minutes:
Code:
reboot system boot 2.6.18-194.el5 Tue May 10 17:35 (19:46)
Your uptime should show as:
Code:
13:22:40 up 19:47 min, 4 users, load average: 1.23, 2.48, 2.66
I think you missed 19 there in the output there will be a minute or two difference because your system got rebooted a minute or two before it came backup.
Another way round use following commands:
last reboot: Check the first line and the time mentioned in ( )
uptime: Check the output with the time mentioned in ( ) of last reboot there will be a minute or two difference thats it.
I guess that answers your query.
Re-run the commands and I guess you will see the correct output.