From owner-freebsd-stable@FreeBSD.ORG Wed May 2 23:11:05 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C438A16A409 for ; Wed, 2 May 2007 23:11:05 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from sccrmhc14.comcast.net (sccrmhc14.comcast.net [204.127.200.84]) by mx1.freebsd.org (Postfix) with ESMTP id 89C9813C45E for ; Wed, 2 May 2007 23:11:05 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from icarus.home.lan (c-71-198-0-135.hsd1.ca.comcast.net[71.198.0.135]) by comcast.net (sccrmhc14) with ESMTP id <200705022310420140025bece>; Wed, 2 May 2007 23:10:42 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 230941FA01D; Wed, 2 May 2007 16:10:42 -0700 (PDT) Date: Wed, 2 May 2007 16:10:42 -0700 From: Jeremy Chadwick To: Kevin Oberman Message-ID: <20070502231042.GA88018@icarus.home.lan> Mail-Followup-To: Kevin Oberman , Henrik Brix Andersen , Doug Barton , freebsd-stable@freebsd.org, Martin Dieringer References: <20070502180254.GD13603@tirith.brixandersen.dk> <20070502213038.7509E45042@ptavv.es.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070502213038.7509E45042@ptavv.es.net> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Doug Barton , freebsd-stable@freebsd.org, Martin Dieringer , Henrik Brix Andersen Subject: Re: clock too slow - big time offset with ntpdate X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2007 23:11:05 -0000 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 |