Operating System - HP-UX
1753787 Members
7527 Online
108799 Solutions
New Discussion юеВ

Re: find out what time server reboot

 
Mariusz Grabowski_2
Frequent Advisor

Re: find out what time server reboot

simply check 'uptime' - you'll see for how long the os is up ;)
Patrick Wallek
Honored Contributor

Re: find out what time server reboot

You can also do a 'who -r' and this will show the exact time the server came back up.
Simon Hargrave
Honored Contributor

Re: find out what time server reboot

# last reboot

this will also show you all instances of reboots. One entry for the pseudo user reboot is added to the wtmp file every time a server is rebooted, so you will be able to see if you've had multiple reboots for example.
Arturo Galbiati
Esteemed Contributor

Re: find out what time server reboot

Hi,
/etc/shutdownlog

HTH,
Art
George Liu_4
Trusted Contributor

Re: find out what time server reboot

last|grep boot
siva0123
Trusted Contributor

Re: find out what time server reboot

Hey
i just found out that the who -b and who -r is not the one to be believed when they are used alone , may be u can use them together with uptime to know that.

This is the o/p from my machine and obviuosly it shows dec 20 but it is not showing me the year ...

root@test:/ -: who -b
. system boot Dec 20 12:29
root@test:/ -: uptime
2:37pm up 367 days, 2:08, 2 users, load average: 0.22, 0.18, 0.21

root@test:/ -: who -r
. run-level 3 Dec 20 12:29 3 0 S


Thanks,
Siva



siva0123
Trusted Contributor

Re: find out what time server reboot

For that matter u cannot rely on last reboot and last | grep boot too.

They are not reporting the year.

The best option should be cat /etc/shutdownlog

or use the above commands lat reboot or who -b or who -r , whatever it is together with uptime to know the exact boot time


Thanks,
Siva
Geoff Wild
Honored Contributor

Re: find out what time server reboot

Actually, it's

last |grep reboot

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Raj D.
Honored Contributor

Re: find out what time server reboot

Kho;ilt,

1. # cat /etc/shutdownlog
2. # last | grep reboot
3. If the server failed due to any sudden power failure etc, there will not be any log in the log file(shutdownlog).

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: find out what time server reboot

Kholiklt,

1. # cat /etc/shutdownlog
2. # last | grep reboot
3. If the server failed due to any sudden power failure etc, there will not be any log in the log file(shutdownlog).

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "