1826388 Members
4544 Online
109692 Solutions
New Discussion

Ntp synch issue.

 
subodhbagade
Regular Advisor

Ntp synch issue.

hello expert,

I have hp-ux (production) server version 11.11 on which SAP application are running and need your help for below's query.

we are facing the problem of synchronization of production server with ntp server.

1) when i am trying to synch with command

#ntpdate -d server ip (it is synchronizing)


It give the offset time of 501 sec which specify production server is 8 min behind than other dev and staging server.

(2) I restarted the Xntpd services after which offset set to 0.0 sec and then production server time was match with other server.

(3)But after 2 day again we are facing the same issue of production (time is behind than other servers) and this was occured twice due to which SAP jobs getting fails.

After Restarting the Xntpd services we can able to resolve the problem again but

(4)what will be solution to fix it permanantly.


Thanks in advance.

Subodh.





4 REPLIES 4
Ivan Krastev
Honored Contributor

Re: Ntp synch issue.

If the offset is bigger, the ntpd daemon cannot sync time and manual syncronization is needed with ntpdate.
See more in troublehooting - http://docs.hp.com/en/B2355-90110/ch08s06.html?btnNext=next%A0%BB

I will suggest you to add an additional ntp server and to have time sync from at least 2 servers.

regards,
ivan
Tim Nelson
Honored Contributor

Re: Ntp synch issue.

Is xntpd running as a daemon all the time and is it configured properly ( view /etc/ntpd.conf ) ?

e.g
server xxx.xxx.xxx.xxx prefer
James R. Ferguson
Acclaimed Contributor

Re: Ntp synch issue.

Hi:

The 'ntpdate' utility is useful at bootup to set a server's clock. To maintain constant, consistent time synchronization, you need to implement 'xntpd'.

This is easily done:

http://docs.hp.com/en/B2355-90774/ch04.html

You should have at least three (3) good sources of external time. These are readily available here:

http://www.pool.ntp.org/

To set the initial time at boot, edit your '/etc/rc.config.d/netdaemons' within the 'xntpd' stanza.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: Ntp synch issue.

ntpdate is the WRONG command to use on a production server without -B. It will suddenly jump the time forward or backward (which is bad). To setup NTP services, you must enable the xntpd daemon in /etc/rc.config.d/netdaemons and verify that your NTP server is reachable:

ntpq -p

Once ntpq is working OK, then slowly adjust the time to match your NTP server:

ntpdate -B

Once the clock is within just a couple of seconds of the NTP server's time, you can just run the xntpd daemon (it goes into the background automatically). At that point, look at syslog for details. xntpd will keep the clock within 128 ms. This assumes you have the following lines in /etc/ntp.conf:

server prefer
fudge 127.127.1.1 stratum 10 # localhost fallback
driftfile /etc/ntp.drift

If you are following an old Linux hack by running ntpdate every few hours, be sure to remove that from cron. Databases do not like time jumping around (as in: corrupted database)


Bill Hassell, sysadmin