1753783 Members
6880 Online
108799 Solutions
New Discussion юеВ

ntp

 
SOLVED
Go to solution
himacs
Super Advisor

ntp


Hi admins,

I have 2 ntp servers .primary and secondary.

i have configured both in /etc/ntp.conf and /etc/rc.config.d/netdaemons
its working fine primary as master and secondery as optional(+)

but i commented(#) primary in ntp.conf so secondary should act as master with next time sync. But it shows previous output only.when i
restarted xntpd it shows sec ans master.

without restring xntpd i want secondery acts as master

help me on this


7 REPLIES 7
BUPA IS
Respected Contributor

Re: ntp

Hello,
The ntp client only reads the config file at startup. You can use the xntpdc command to add and remove services if you set up the ntp security keys. Restarting ntp on a sychronised system usualy has little effect.
Check the offsets with ntpdate first though.

However there is no real concept of secondary and primary time servers. ntp works out which is the most reliable time server and chooses that as the server to synchronise the clock with. If you only use two time sources it will flip flop between them, because it never quite knows which is correct. You should use a third one to give you a casting vote. So if two agree and one has gone wrong you still have a reliable time setting .

I hope this helps
Mike
Help is out there always!!!!!
himacs
Super Advisor

Re: ntp

thanx BUPA,

my concern is if first server crashed,the second one should take care of time syncing.

in ntp.conf and netdaemons i have mentione dboth servers

ntp.conf
------
10.10.15.10
10.10.18.23

NETDAEMONS
-------
export NTPDATE_SERVER='10.10.15.10 10.10.18.23'
export XNTPD=1
export XNTPD_ARGS=



regards
himacs
BUPA IS
Respected Contributor
Solution

Re: ntp

hello ,
Your settings seem fine
If you look at the output of ntpq -p and ntpq -c rv you will see which severs are in use and which one your system is sychronised to.

mike
Help is out there always!!!!!
Steven E. Protter
Exalted Contributor

Re: ntp

Shalom,

Your ntp setup should work as a sort of cluster.

If both servers have access to external time sources, then if primary is gone for a while nothing bad will happen.

The key is to configure the internal systems connecting to use both servers, then you will be fine.

ntp was designed as an active active highly available mode of operation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: ntp

Hi:

BUPA is correct. A good setup uses at least three time sources to avoid synchronization with an "insane" timekeeper. As NTP works you may see a different time source "promoted". This is normal and occurs if/when NTP decides that a better source exists.

Regards!

...JRF...
himacs
Super Advisor

Re: ntp

Thanks you all for u replies.U guided me well.



/sbin/init.d/xntpd start
2 Jul 09:08:58 ntpdate[23513]: step time server 10.10.45.21 offset -288.642757 sec

here whats step time server...whether it means secondery one..


regards
himacs




BUPA IS
Respected Contributor

Re: ntp

Hello,

> 2 Jul 09:08:58 ntpdate[23513]: step time server 10.10.45.21 offset -288.642757 sec

The step time message comes from ntpdate and it shows you the result of the ntpdate call (using the list in /etc/rc.config.d/netdaemons ). the message shows you that it had to adjust the time by 288 seconds to line it up with the ntp server at address 10.10.45.21. Which by the way was not one of the addresses you mentioned earlier. The start script then moves on and starts ntpd using the ntp.conf settings .
Regards
Mike
Help is out there always!!!!!