[ntp:questions] ntpd -gq VS ntpdate -B

Steve Kostecke kostecke at ntp.isc.org
Mon Apr 30 03:26:03 UTC 2007


On 2007-04-12, RICCARDO <castellani.riccardo at tiscali.it> wrote:

> I want to use ntpd -qg, it could be right this ntp.conf for my Linux
> client ?
>
> restrict default ignore
> restrict 127.0.0.1
> restrict server A
> restrict server B
> server A
> server B

The problem with using only two time sources is that ntpd will not be
able to determine which one is correct if there is any great difference
in their time.

If you are relying on remote time servers that you don't control then
you really should use 3, or more.

If you are relying on two time servers that you control then you should
either:

1. Configure them so that one (e.g. B) is set to prefer the other (e.g.
A) so that

2. Closely monitor those two time servers to insure that they are in
close agreement.

> driftfile /var/lib/ntp/drift
> broadcastdelay  0.008

You don't need broadcastdelay unless this ntpd is broadcast client _and_
it is unable to automatically calculate the broadcast delay during the
unicast phase of the association.

> what means "the initial time setting isn't complete when it exits" ?

ntpd will intiate a slew (i.e. change the clock freqnency)() and exit if
the clock offset is less than 128ms. The clock will continue to run at
this modified frequency until another adjustment is made. If the clock
is allowed to run long enough with out another adjustment the offset
will cross zero.

-- 
Steve Kostecke <kostecke at ntp.isc.org>
NTP Public Services Project - http://ntp.isc.org/




More information about the questions mailing list