Date: Wed, 2 May 2007 16:10:42 -0700 From: Jeremy Chadwick <koitsu@FreeBSD.org> To: Kevin Oberman <oberman@es.net> Cc: Doug Barton <dougb@FreeBSD.org>, freebsd-stable@freebsd.org, Martin Dieringer <martin.dieringer@gmx.de>, Henrik Brix Andersen <henrik@brixandersen.dk> Subject: Re: clock too slow - big time offset with ntpdate Message-ID: <20070502231042.GA88018@icarus.home.lan> In-Reply-To: <20070502213038.7509E45042@ptavv.es.net> References: <20070502180254.GD13603@tirith.brixandersen.dk> <20070502213038.7509E45042@ptavv.es.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 02, 2007 at 02:30:38PM -0700, Kevin Oberman wrote: > A few more comments: > > If ntpd is started with the '-g' flag, it will initially step the time > so you get your clock set as you would have with ntpdate. This is set in > /etc/rc.conf as 'ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift -g". > > You also should add 'iburst' to each server line in ntp.conf. This will > cause several queries to be made to each server at startup so that > there will not be a long delay before the clock is synchronized. Without > the 'iburst', your time won't be set for about 4or 5 minutes. I'll include the ntp.conf configuration we use, as well relevant rc.conf portions, on a few of our production machines. There are some "FreeBSD-isms" in ntp.conf which are worth noting. I keep the comments around solely so I don't forget. :-) ntp.conf: # clock.isc.org # clepsydra.dec.com # # maxpoll 9 is used to work around PLL/FLL flipping, which # happens at exactly 1024 seconds (the default maxpoll value). # Another FreeBSD member recommended using 9 instead. # http://lists.freebsd.org/pipermail/freebsd-stable/2006-December/031512.html # server 204.152.184.72 iburst maxpoll 9 server 204.123.2.5 maxpoll 9 # Default: ignore all ntp queries from ALL other hosts restrict default ignore # Allow queries to/from the NTP hosts listed in "server" lines restrict 216.218.192.202 mask 255.255.255.255 restrict 216.218.254.202 mask 255.255.255.255 restrict 204.152.184.72 mask 255.255.255.255 restrict 204.123.2.5 mask 255.255.255.255 # Allow queries to/from localhost, used for ntpdc and other utils restrict 127.0.0.0 mask 255.0.0.0 # Allow queries to/from the local private network restrict 192.168.1.0 mask 255.255.255.0 nomodify rc.conf: ntpd_enable="yes" ntpd_sync_on_start="yes" Applicable process: root 652 0.0 0.1 3148 1564 ?? Ss 22Apr07 0:16.13 /usr/sbin/ntpd -g -p /var/run/ntpd.pid -f /var/db/ntpd.drift -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070502231042.GA88018>