Operating System - HP-UX
1825792 Members
2566 Online
109687 Solutions
New Discussion

Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

 
MGM
Occasional Contributor

Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

For now, I'd like to setup NTP to Synchronize my Servers locally and not from a Remote site.I have several HP9000 servers running HPUX 11.0 and 10.20. I want to setup a Local Master NTP servers and then add my Clients. But if the Clock on the Clients are Ahead or Behind the Local Master NTP Server. Then what will occur when the Clients Sync up. These Clients are running either Oracle, SAP, or Sybase. And these Clients have several Crontabs. Also are there any issues with HPUX 10.20 Clients Syncing up to a Master NTP Server running HPUX 11.0.
Where the LION Roars
8 REPLIES 8
Francois Bariselle_3
Regular Advisor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

A. Clay Stephenson
Acclaimed Contributor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

This is exactly the situation NTP was designed for. If the clients are not too far out of sync, then they will "slew" the time - in essense the clock ticks will be slower or faster as needed until the time is synced. In database environemts the thing that you want to avoid is "stepping" (abrupt) behavior. That can throw database timestamps out of sync and thus it might be possible for transaction 101 to occur before transaction 100. If the server and client are out of sync by more than 1000 seconds, manual intevention is required but otherwise NTP will gradually and gracefully sync the times. One other method is to allow your local server to sync to a network time source like the U. S. Naval Observatory and then all your clients sync to your local server.
If it ain't broke, I can fix that.
Francois Bariselle_3
Regular Advisor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

MORE INFORMATION:

On serveur, add this at end of /etc/ntp.conf:

broadcast 192.168.1.255 version 3
server 127.127.1.1

On clients, add this at end of /etc/ntp.conf

server canopus version 3

(If canopus is the server)


With /etc/rc.config.d/netdaemons
ON Clients,

export NTPDATE_SERVER=canopus
XNTPD=1
export XNTPD_ARGS=

ON Server,

export NTPDATE_SERVER=lents40inf02
XNTPD=1
export XNTPD_ARGS=

Frank.
Fais la ...
James R. Ferguson
Acclaimed Contributor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

Hi Lionel:

There is no problem running one (or more) of your servers as local "master" clocks. Neither is there a problem when with mixed OS levels. 'xntpd' (NTP) will not synchronize with a time source if the source and the server differ by more than 1000 seconds. You should plan to adjust each participate to within several seconds first. You can do this at bootup with 'ntpdate' and/or with the 'date' command (particularly 'date [-a [-]sss [. fff]]' in 11.x).

See the man pages for the aforementioned commands and see chapter-7 of "Installing and Administering Internet Services" for a complete guide to setting up NTP.

Once established, NTP will keep your server's time very well controlled. 'cron' time differences will never be an issue since 'cron' operates at a resolution of 0ne-minute, anyway.

Regards!

...JRF...


James R. Ferguson
Acclaimed Contributor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

Hi (again):

Sorry, I meant to post the link to the manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html

Regards!

...JRF...
MANOJ SRIVASTAVA
Honored Contributor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

Hi Lionel


Essentially no problems will occur as there servers will try to sync with in the 1000 ie 16 mts and 40 seconds seconds difference . A good idea however is to have layered approach ie create a cluster of servers in the remote location pointing to a master over there and have that mster synced up wiht a master here which again is the reference for the cluster locally , incase you have less than 3 servers then it is better to have tehm correct each otheres time . Essentially you can group them at a lover startum and have them defined in /etc/ntp.conf as a peer to each other . Ofcourse the Bible says it all :
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90685/B2355-90685_top.html&con=/hpux/onlinedocs/B2355-90685/00/00/63-con.html&toc=/hpux/onlinedocs/B2355-90685/00/00/63-toc.html&searchterms=NTP&queryid=20020415-123421

Manoj Srivastava
Bill Hassell
Honored Contributor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

If you have kept upp to date on patches, ntpdate will have a new option: -B which will slew the time (very) slowly for badly out of sync clients. For example, a 10 minute error will tak 3-5 hours to adjust.

AS mentioned, slewing the clock prevent database problems. It does thos by not skipping any time ticks but making them slightly shorter or lonher apart. The database(s) won't see any unusual as every second is counted.

When a client is rebooted, ntpdate -b is run prior to any time-critical programs to step the clock to exact time. This is done in the startup scripts.


Bill Hassell, sysadmin
David Lodge
Trusted Contributor

Re: Setting up NTP for Local and Clients on multi-tier SAP / Oracle Environmentd

One extra note... xntpd by default listens to the network - even on clients... This allows somebody to interrogate the NTP variables and peer lists (allowing somebody to potentially perform a mapping of the network.)

To increase the security of the system, you can't stop xntpd listening to the network, but you can tell it to ignore all traffic. I suggest adding the following line to the end of /etc/ntp.conf on clients:

restrict default ignore

Which will ignore any traffic except for configured traffic.

dave