From owner-freebsd-stable@FreeBSD.ORG Wed May 2 17:49:57 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 31B1E16A400 for ; Wed, 2 May 2007 17:49:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx24.fluidhosting.com [204.14.89.7]) by mx1.freebsd.org (Postfix) with SMTP id DCAAF13C4B7 for ; Wed, 2 May 2007 17:49:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 20558 invoked by uid 399); 2 May 2007 17:23:15 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 2 May 2007 17:23:15 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <4638C8FD.3060606@FreeBSD.org> Date: Wed, 02 May 2007 10:23:09 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Martin Dieringer References: <20070501204548.L860@thinkpad.dieringer.dyndns.org> <20070502020319.GB6419@SDF.LONESTAR.ORG> <20070502132330.U860@thinkpad.dieringer.dyndns.org> In-Reply-To: <20070502132330.U860@thinkpad.dieringer.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org 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 17:49:57 -0000 Martin Dieringer wrote: > On Wed, 2 May 2007, John Walthall wrote: > >> On Tue, May 01, 2007 at 08:50:10PM +0200, Martin Dieringer wrote: >>> I think it has to do with powerd, if I kill that, the time stays >>> correct. >> >> With powerd enabled, are you able to maintain a "reasonably" >> correct time with frequent NTP syncronizations? Sorry if it's just >> me, but I am not quite clear about that, from what has been written >> already. > > I would have to update every minute at least and would still be more > than 5 seconds off. I think you misunderstand how ntpd works vs. how ntpdate works. ntpd is a daemon, so you don't run it every minute, it runs in the background and keeps the clock up to date. Assuming that 1.2.3.4 is the IP address of the server you're using for ntpdate, create a file named /etc/ntp.conf that looks like this: server 1.2.3.4 driftfile /var/db/ntp.drift logfile /var/log/ntpd Then make sure you have the following in /etc/rc.conf: ntpdate_enable="yes" ntpdate_flags="-sb 1.2.3.4" ntpd_enable="yes" Turn off all of the power management, and any other service that might be affecting the clock, and then reboot. If your system is able to maintain correct time under these circumstances, start adding things in until you find the culprit and let us know. If you're still having problems, it might be the HZ setting. I upgraded an older box to 6-stable recently and the clock went nuts in spite of having ntpd running. The ntpd process couldn't adjust fast enough. I solved it by putting options HZ=100 in my kernel config file. hth, Doug -- This .signature sanitized for your protection