From owner-freebsd-current Mon Jul 15 13:12:22 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA07126 for current-outgoing; Mon, 15 Jul 1996 13:12:22 -0700 (PDT) Received: from pcpsj.pfcs.com (harlan.fred.net [205.252.219.31]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA07017 for ; Mon, 15 Jul 1996 13:11:55 -0700 (PDT) Received: from mumps.pfcs.com (mumps.pfcs.com [192.52.69.11]) by pcpsj.pfcs.com (8.6.12/8.6.9) with SMTP id QAA11293; Mon, 15 Jul 1996 16:11:25 -0400 Received: from localhost by mumps.pfcs.com with SMTP id AA00110 (5.67b/IDA-1.5); Mon, 15 Jul 1996 16:11:24 -0400 To: sthaug@nethelp.no Cc: bde@zeta.org.au, current@freebsd.org Subject: Re: xntpd stepping clock backwards? (was: Re: NFSv3 fixes for review) In-Reply-To: sthaug@nethelp.no's message dated Mon, 15 Jul 1996 14:28:34. <20426.837433714@verdi.nethelp.no> Date: Mon, 15 Jul 1996 16:11:22 -0300 Message-Id: <108.837461482@mumps.pfcs.com> From: Harlan Stenn Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk How stable is the reference you're syncing with? If it's not being stable, that's one possibilty. More likely is that the clock in your machine is a bit off. How big is the drift value in /etc/ntp.drift (check for the "driftfile /wherever" line in ntp.conf)? The first number should be between -105.xxx and 105.xxx. If it's not, you'll need to run tickadj -t (once when you decide to change it, and at boot time). Here's a script I've used that usually does the right thing. Note that if you change the "base" value of tick using "tickadj -t " then this script will show you the size and amount of change, not the actual value to put in. H #! /usr/bin/perl # # drift of 104.8576 -> -1 tick. Base of 10000 ticks. # $df="/etc/ntp.drift"; $base=10000; $cvt=104.8576; $v1=0.; $v2=0; if (open(DF, $df)) { if ($_=) { ($v1, $v2) = split; } while ($v1 gt $cvt) { $v1 -= $cvt; $base--; } while ($v1 lt 0) { $v1 += $cvt; $base++; } } printf("%.3f %d\n", $v1,$v2); print("$base\n");