From owner-freebsd-stable@FreeBSD.ORG Tue May 8 15:12:01 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 B3C7016A419 for ; Tue, 8 May 2007 15:12:01 +0000 (UTC) (envelope-from martin.dieringer@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 6503413C4E8 for ; Tue, 8 May 2007 15:11:58 +0000 (UTC) (envelope-from martin.dieringer@gmx.de) Received: (qmail invoked by alias); 08 May 2007 15:11:56 -0000 Received: from c-134-228-89.d.dsl.de.ignite.net (EHLO dieringer.dyndns.org) [62.134.228.89] by mail.gmx.net (mp044) with SMTP; 08 May 2007 17:11:56 +0200 X-Authenticated: #21464393 X-Provags-ID: V01U2FsdGVkX18YizMsS1EYo3CVSQ98NshNOWXFgMoNIf88QkYFev iZxuRQanp9bfUC Received: (qmail 24148 invoked by uid 1001); 8 May 2007 15:11:48 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 8 May 2007 15:11:48 -0000 Date: Tue, 8 May 2007 17:11:48 +0200 (CEST) From: Martin Dieringer To: freebsd-stable@FreeBSD.ORG In-Reply-To: <200705081429.l48ETYYr087578@lurza.secnetix.de> Message-ID: <20070508164234.L839@thinkpad.dieringer.dyndns.org> References: <200705081429.l48ETYYr087578@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Y-GMX-Trusted: 0 Cc: Subject: Re: clock problem X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Martin Dieringer List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2007 15:12:02 -0000 On Tue, 8 May 2007, Oliver Fromme wrote: > Martin Dieringer wrote: > > Oliver Fromme wrote: > > > Are you sure that your /etc/ntp.conf ist correct? > > > > # cat /etc/ntp.conf > > > > server time.fu-berlin.de iburst maxpoll 9 > > driftfile /var/db/ntp.drift > > logfile /var/log/ntpd > > You must add "restrict" lines for every server and for > localhost, like these: > > restrict time.fu-berlin.de nomodify > restrict 127.0.0.1 I'm sorry I do not understand what this flag is for (I don't understand the manpage either) > > # ntpq -p > > No association ID's returned > > That's because the default (when no "restrict" lines are > there) doesn't allow a connection at all.. well now it works without "restrict": # ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *time 192.53.103.108 2 u 19 64 77 91.454 301.926 860.104 and the clock is "only" 3 seconds late now... > > and how will the clock run when not connected to the internet? > > ntpd calculates the drift of the local clock. During times > when it cannot reach the server, it corrects the local > clock using the recorded drift. ok this sounds beautiful, but what if the drift is irregular? Maybe if it depends on the load of the machine etc.? Maybe ntpd just can't handle this? the clock should run correct in the range of very few seconds a day. There is an error somewhere and using ntpd to mask this is just cosmetic. > > it should at least be somehow in a sensible range > > Yes, it should, if the off-line times aren't too long. no, it should if there is no on-line connection at all, or shouldn't it? > > But 2 minutes is also too much > > ntpd should be able to handle that without problems. yes maybe, sometimes... > > I have to redialup every 24h which normally works fine. > > How are you redialling? If you get a new dynamic IP > address, it might be necessary to restart ntpd. > MYADDR: > !bg /etc/rc.d/ntpd restart great! 8-( as "restart" does not work because the pid seems to be wrong and usually there are 5 or so ntpd's running... ? btw, this is on the other machine which is now 2 minutes off again, maybe 1 hour after correct setting: # ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== chronos.zedat.f .PPS. 1 u 457 512 377 366.965 37369.6 8640.85 log: 8 May 16:11:08 ntpd[57617]: synchronized to 130.133.1.10, stratum=1 8 May 16:11:08 ntpd[57617]: time reset +0.651381 s 8 May 16:11:08 ntpd[57617]: kernel time sync disabled 2041 8 May 16:12:22 ntpd[57617]: synchronized to 130.133.1.10, stratum=1 8 May 16:13:30 ntpd[57617]: no servers reachable now: 16:57 m.