From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 19 16:48:19 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 6BE6F16A41F for ; Tue, 19 Jul 2005 16:48:19 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CCC43D45 for ; Tue, 19 Jul 2005 16:48:18 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j6JGmHV5015181; Tue, 19 Jul 2005 12:48:18 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <0cbd01c58c60$246dc590$1700a8c0@failure> References: <0cbd01c58c60$246dc590$1700a8c0@failure> Date: Tue, 19 Jul 2005 12:48:17 -0400 To: "Joshua Coombs" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.3 Cc: 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 16:48:19 -0000 At 8:48 AM -0400 7/19/05, Joshua Coombs wrote: >Garance A Drosihn" writes: >> >>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. >Easiest way to prevent this, have more than 2 servers listed. We have two ntp servers on campus, and I'll change my ntp.conf to use both of them instead of just one. I've always meant to do that anyway. >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. If our two ntp servers go down, then (a) I'll certainly know about it, and (b) I'll have much much bigger concerns than whether my Mac-mini is off by a few minutes! :-) >example /etc/rc.conf settings: >ntpdate_enable="YES" >ntpdate_flags="-g -q -N high" >ntpdate_program="/usr/sbin/ntpd" Okay, so I added these to rc.conf, and did: (38) /etc/rc.d/ntpdate start Setting date via ntp. usage: /usr/sbin/ntpd [ -abdgmnqx ] [ -c config_file ] [ -e e_delay ] [ -f freq_file ] [ -k key_file ] [ -l log_file ] [ -p pid_file ] [ -r broad_delay ] [ -s statdir ] [ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ] There is no -N supported. So I dropped that, and still got the error message. Turns out that the way /etc/rc.d/ntpdate works, it ends up running: /usr/sbin/ntpd -g -q ntp.rpi.edu ntp1.rpi.edu I changed the rc.conf to add: ntpdate_hosts="-c /etc/ntp.conf" and then got: (43) /etc/rc.d/ntpdate start Setting date via ntp. ntpd: time set +9.014549s My guess is that few people have tried to config ntpdate in this manner. Looking at /etc/defaults/rc.conf, maybe I should set: ntpd_sync_on_start="YES" ntpdate_enable="NO" >xntpd_enable="YES" >xntpd_flags="-g -p /var/run/ntpd.pid" These variables don't exist. Are you working with the /etc/rc files from an earlier release of FreeBSD? In 6.x, there is no 'x' in the variable names. >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. Okay, I've got that running, and I'll get back with those details later tonight or tomorrow. Thanks for these ideas. > >>(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? No. There are no error message, but it does not work. For instance, a 'locate a' command gives me a list that starts out: /ec /ec /ec /ec ...and I have no file or directory named /ec. I can destroy and rebuild the locate database, and I get the same results. Looking at the algorithm used by the locate programs, it is almost certain that somewhere it is using a 'char' and expecting that to be 'signed char', when on PowerPC it is 'unsigned char'... It is doing a number of clever things with 'char' variables, sometimes explicitly using 'unsigned char', and other times using plain 'char' (and probably assuming those are signed). -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu