Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Time does not stay set on HPUX 11.31 and RX2800 I4 platform

Matthew Murdock
Frequent Advisor

Time does not stay set on HPUX 11.31 and RX2800 I4 platform

This is a strange problem. I can set the date from the HPUX command prompt with date 02251422 (for example), or with set_parms date_time and it works, However upon reboot, the time gets skewed 8 hours ahead.

Date -u shows the UTC clock set the same as its twin system.  I do have the latest QP pack bundle installed. The 2 nodes are running serviceguard and oracle Rac 12c, so yeah, its kinda important to keep the time set upon reboots.

I do have NTP setup and working, but the when ntpdate gets ran, the clock skews ahead 8 hours. The opposite node using the same time server gets sync'd properly with the same ntpdate command.  Any clues, ideas? Permissions maybe but on what?

4 REPLIES
Bill Hassell
Honored Contributor

Re: Time does not stay set on HPUX 11.31 and RX2800 I4 platform

It would help if you listed the output from date, like this:

# date
Fri Feb 24 21:24:08 EST 2017

The important part here is the timezone translator code EST.
If I temporarily change the TZ variable (read the environ man page), it will show the time based on that timezone:

# TZ=PST8PDT date
Fri Feb 24 18:24:23 PST 2017

Same machine, different TZ environment variable - in this case, just foer the execution of the date command.

Most likely the contents of /etc/TIMEZONE does not match your local timezone.
Look at that file on the working system.

HP-UX keeps time in UTC and commands and system calls display or manipulate the time for any timezone by simply changing TZ.
NOTE: If you change the time ti "fix" the problem, the UTC value will be wrong. 
You said that date -u is right, so don't change the time. Edit /etc/TIMEZONE, then reboot (shutdown your databases and apps). NTP set the time correctly. You are just viewing it from another timezone.

 



Bill Hassell, sysadmin
Matthew Murdock
Frequent Advisor

Re: Time does not stay set on HPUX 11.31 and RX2800 I4 platform

All 4 Servers are set to EAT-8. I can set the time no problem, but something is not allowing that time to stay set in the OS on this particular node.

I skewed the time 12 hours ahead on another node, rebooted and it stayed set. I set it back again with the date command, rebooted, and it stayed set again (NTP is active on this node, so I dont really think the NTP server is doing its job for what its worth).

I do have the XNTPD_SERVER=ntp-server and XNTPD=1 in the netdaemons on all 4 nodes.

On the node not working, I set the time with date, reboot, the time gets skewed ahead (always ahead, never back) 8 hours, upon reboot. No NTP in play at the moment on this box. I then set the time again, with date, to proper time and it stays functioning, until reboot.

The NICS are set in APA Failover group which functions as needed.

I may have to have HP support come on site for this.

Bill Hassell
Honored Contributor

Re: Time does not stay set on HPUX 11.31 and RX2800 I4 platform

>> All 4 Servers are set to EAT-8.

So when you run the date command, it shows EAT as in:

# date
Sun Feb 26 00:04:19 EAT 2017

>> I skewed the time 12 hours ahead on another node, rebooted and it stayed set.

The NTP server is probably working just fine but your system is misconfigured. When you reboot, the file /etc/rc.config.d/netdaemons should specify the NTP server to use, like this:

export NTPDATE_SERVER="ns1.usg.edu"
export XNTPD=1
export XNTPD_ARGS="-l /var/adm/xntpd.log"

If the NTP server name is misspelled then the time will be left alone and the error noted in /etc/rc.log (and in the above example, xntpd.log). You can test to see if the NTP server is reachable using ntpq like this:

 # ntpq -p ns1.usg.edu
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
-ipam1.bor.usg.e 130.207.244.240  2 u   80 1024  377    5.185   -0.033  15.114
+tick.usg.edu    .GPS.            1 u  777 1024  377    5.382   -0.191  18.729
*navobs1.gatech. .GPS.            1 u  881 1024  377    1.354   -0.089  19.001
+utcnist2.colora .NIST.           1 u 1050 1024  377   41.845   -0.104  19.164
 LOCAL(0)        .LOCL.           6 l  74d   64    0    0.000    0.000 15937.5

In this example, the NTP server ns1.usg.edu is using the listed server names as time sources.
If instead you see something like this:

# ntpq -p hpe.com
hpe.com: timed out, nothing received
***Request timed out

Then that server is not providing NTP services, or the host (using port 123) is blocked for your system.

Run the command: ntpq -p (with no server specified) to test your NTP settings on the node that doesn't sync to NTP on reboot. ntpq -p will show you what that system is using for NTP servers.

>> On the node not working, I set the time with date, reboot, the time gets skewed ahead (always ahead, never back) 8 hours, upon reboot. No NTP in play at the moment on this box. I then set the time again, with date, to proper time and it stays functioning, until reboot.

Not sure what you did here. You forced the date to match your local time, then reboot and the time is 8 hours off? Remember that setting the date will always use the current value of $TZ to translate the setting to UTC.
Does /etc/rc.log give you any clue what happens when NTP is started?

But still missing the output from several commands. Can you post the output from:

# echo $TZ
# date # date -u # cat /etc/TIMEZONE

You should see EAT in the date result. You should also see EAT in the /etc/TIMEZONE file. If not, copy the TIMEZONE file from one of the working systems.


Now, EAT (east Africa) is not defined in the standard HP-UX /usr/lib/tztab file so it may be that someone has customized this file. From the environ man page, you can create any timezone you want. If EAT is found in the tztab file on the working systems, then copy the tztab file to the problem system.

In verifying this problem, you can see if the date command reverts to the HP-UX default MST by setting to a junk value like this:

# TZ=XYZ date
Sat Feb 25 16:42:10 XYZ 2017
# TZ=MST date
Sat Feb 25 16:42:20 MST 2017

Since XYZ is not defined in tztab, the time will be shown in MST (Mountain time in the US), the internal default for HP-UX. The default is set by the kernel parameter timezone as minutes west of UTC or 420. Hint: kctune timezone

If you post the requested output from date, ntpq  we can probably give the solution.



Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Time does not stay set on HP-UX 11.31 and RX2800 I4 platform

> Servers are set to EAT-8.

 

What timezone is this?  -8 (UTC+8) corresponds to Western Australia.  google has EAT as East Africa UTC+3.

 

> EAT (east Africa) is not defined in the standard HP-UX /usr/lib/tztab

 

Not with -8.