From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 19 12:48:22 2005 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04F8B16A41F for ; Tue, 19 Jul 2005 12:48:22 +0000 (GMT) (envelope-from jcoombs@gwi.net) Received: from aphrodite.gwi.net (aphrodite.gwi.net [207.5.128.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9318D43D4C for ; Tue, 19 Jul 2005 12:48:21 +0000 (GMT) (envelope-from jcoombs@gwi.net) Received: from failure (murdoc.gwi.net [207.5.142.8]) by aphrodite.gwi.net (8.13.1/8.13.1) with SMTP id j6JCmKq2043970 for ; Tue, 19 Jul 2005 08:48:20 -0400 (EDT) (envelope-from jcoombs@gwi.net) Message-ID: <0cbd01c58c60$246dc590$1700a8c0@failure> From: "Joshua Coombs" To: References: Date: Tue, 19 Jul 2005 08:48:19 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Subject: Re: Minor issues of time on PPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2005 12:48:22 -0000 ----- Original Message ----- From: "Garance A Drosihn" To: Sent: Tuesday, July 19, 2005 1:02 AM Subject: Minor issues of time on PPC > I've noticed a few minor issues with tracking the present time > on my Mac-mini. > Hmm. I just noticed that > ntpd is running with '-f /var/db/ntpd.drift' -- but that file does > not exist. But then, it doesn't exist on my other freebsd machines, > and they all seem to keep accurate time. Still, I'm going to try > creating that file and see if it does any good. echo 0 > /var/db/ntpd.drift restart ntpd ntpd can be pissy at times if it only has 1 or 2 external servers to work with. It'll decide that the local system is infact more accurate and start ignoring remote systems, drifting further and further as the system runs. Easiest way to prevent this, have more than 2 servers listed. example /etc/ntp.conf: server 0.pool.ntp.org iburst server 1.pool.ntp.org iburst server 2.pool.ntp.org iburst server 127.127.1.1 fudge 127.127.1.1 stratum 12 driftfile /var/db/ntp.drift This conf pulls 3 servers from the public ntp pool project, and sets up a 'local' refrence clock to fall back to should all three remote servers go down. This is just the local clock after being disciplined by ntp, so it's not accurate, hence the very high stratum forced on it. 'iburst' tells ntp to be aggressive figuring out drift and jitter at startup to get the local clock disciplined quickly. Lastly we define the drift file in the conf so you don't have to specify it on the command line. example /etc/rc.conf settings: ntpdate_enable="YES" ntpdate_flags="-g -q -N high" ntpdate_program="/usr/sbin/ntpd" xntpd_enable="YES" xntpd_flags="-g -p /var/run/ntpd.pid" This sets up a couple things. First, ntpdate is depreciated, so we use ntpd to set the initial time. This takes slightly longer but in addition to setting the time it puts an initial clock rate adjustment into place. Also, '-N high' tells ntpd to use a higher scheduling priority than normal. ntpd doesn't use much cpu, so when it does, I prefer to let it have as much as it needs uninterrupted. Try this, let the machine run for a couple hours, then email the output of: ntpdc -c loopinfo ntpdc -c kerninfo ntpq -p Based on that, we can see if ntp is at fault, or something else is up. > (other examples: > - locate doesn't seem to work at all, which I actually > have started to look into a bit. Does it complain there isn't a locate db? /usr/libexec/locate.updatedb to bring it up to date Joshua Coombs