1834250 Members
2000 Online
110066 Solutions
New Discussion

verify boot date

 
SOLVED
Go to solution
iranzo
Frequent Advisor

verify boot date

Hello,

On a script i want to test the boot date on HPUX server

How can i do ?

thanks a lot .
Bonjour
7 REPLIES 7
Fabrice Meynard
Frequent Advisor

Re: verify boot date

Hi,

you can use uptime or search in syslog.log "syslogd: restart" followed by vmunix entries. Care, "syslogd: restart" can be here if you restart manualy syslogd.

Hope this helps.
Fabrice
T G Manikandan
Honored Contributor
Solution

Re: verify boot date

If you want to know the Hpux installation date you can use

/opt/ignite/bin/print_manifest
to get it.

If you want to know the server restarted date then just do
#cat /var/adm/syslog/syslog.log|head -1|awk -F " " '{print $1,$2}'


Thanks
leereg_6
Advisor

Re: verify boot date

Hi,

Or you can just try the command:
#last boot
and the prompt will be:

wtmp begins Fri Apr 19 09:26


Hope it will help!
Jerome Baron
Respected Contributor

Re: verify boot date

Hi,

or you use :
$ who -b
. system boot Oct 30 13:16

Regards,
Jerome
Bill McNAMARA_1
Honored Contributor

Re: verify boot date

try
uptime

Bill
It works for me (tm)
Pete Randall
Outstanding Contributor

Re: verify boot date

You can also do a "ps -ef | grep init"

Pete

Pete
Jeff Schussele
Honored Contributor

Re: verify boot date

Hi,

The last boot command can be deceptive because it's the creation date of wtmp & it's not recreated every boot.

Determining from syslog can be problematic if it's being trimmed in any way.

I like the who -b the best, but Pete's solution is just as reliable & creative as well.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!