Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 2006 15:40:11 -0700
From:      Chuck Swiger <cswiger@mac.com>
To:        Zbigniew Szalbot <zbyszek@szalbot.homedns.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ntpd not adjusting the clock?
Message-ID:  <F5EF37C8-7955-4246-932E-833A537A4009@mac.com>
In-Reply-To: <20061018000853.O49453@192.168.11.51>
References:  <20061018000853.O49453@192.168.11.51>

next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 17, 2006, at 3:13 PM, Zbigniew Szalbot wrote:
> My ntp.conf file looks like that:
>
> server 2.pl.pool.ntp.org prefer
> server 1.europe.pool.ntp.org
> server 0.europe.pool.ntp.org
> restrict default ignore
> driftfile /var/db/ntp.drift

Unless you've got additional restrict lines which permit some hosts  
to make changes, using only "restrict default ignore" will prevent  
ntpd from paying attention to the timeservers you've listed and it  
will even prevent ntpd from changing the local clock or being  
administered via ntpq from localhost.

This misconfiguration will also cause your ntpd to generate excessive  
numbers of queries, rather than syncing up and reducing the NTP  
polling interval from minpoll to maxpoll. [1]

Remove that line and restart ntpd.

> The rc.conf file has these lines:
> ntpd_enable="YES"
> ntpd_flags="-g -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ 
> ntp.drift"
>
> What am I doing wrong that instead of having the time synced I see  
> more and more discrepancy. When I rebooted and started the service  
> 6 days ago there was about 20 seconds difference. Now it is well  
> over 30.

Run:

     ntpq -c peers

...and you will be able to see the delay and offset from the NTP  
clocks you've configured in ntp.conf.

-- 
-Chuck

[1]: There are entire Linux distributions which have shipped with  
ntp.conf configured to prevent ntpd from working properly.  These  
client machines end up querying NTP servers in the pool.ntp.org  
service repeatedly at minpoll (or even faster, if iburst is  
specified) because they discard the responses given to them, and  
therefore constitute an abuse of NTP server resources.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F5EF37C8-7955-4246-932E-833A537A4009>