From owner-freebsd-questions@FreeBSD.ORG Sat Jul 21 01:02:00 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 138DB16A41A for ; Sat, 21 Jul 2007 01:02:00 +0000 (UTC) (envelope-from chrisj@puffin.com) Received: from dns4.mcn.org (dns4.mcn.org [216.150.240.31]) by mx1.freebsd.org (Postfix) with ESMTP id 0543C13C442 for ; Sat, 21 Jul 2007 01:01:59 +0000 (UTC) (envelope-from chrisj@puffin.com) Received: from [63.199.80.233] (helo=puffin.com) by dns4.mcn.org with smtp (Exim 4.60) (envelope-from ) id JLI7ED-000DC6-39 for freebsd-questions@freebsd.org; Fri, 20 Jul 2007 17:44:37 -0700 Received: (qmail 83241 invoked by uid 1016); 21 Jul 2007 00:44:31 -0000 Message-ID: <20070721004431.83240.qmail@puffin.com> Date: 20 Jul 2007 17:44:31 -0700 From: Chris Jewell To: freebsd-questions@freebsd.org Subject: Adjusting clock speed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2007 01:02:00 -0000 We have a server running 5.3-RELEASE, whose clock varies somewhat, but averages about 66 parts-per-million fast. I know about both xntpd and ntpdate, but our nominally-full-time Internet connection is not all that reliable, so I'd like to adjust the speed of the time-of-day clock so that only an occasional ntpdate, rather than an hourly one, or the full-scale daemon, is needed to keep our email timestamps accurate to the nearest second. In a previously life, I had the same issue with a Linux box, and discovered a command called adjtimex which helped, but there doesn't seem to be anything like that on FreeBSD. My current guess is that the way to do this on FreeBSD is to tweek one of the sysctl settings, perhaps increasing machdep.i8254_freq: 1193182 by something like 66 * (1193162/1000000), since we're fast by about 66 ppm, or perhaps it's one of the kern.timecounter.* variables that I need to change, or hw.clockrate, or .... Anyway, can someone advise me which variable I really need to adjust? When I try to read the kernel source and figure it out, I tend to get confused. Thank you. (PS: Yeah, I know: I ought to upgrade to 6.2, or at least 5.5, and will do that sometime soon. :-) I've been in ``don't fix what's not broken'' mode. :-) ) And a big thank you to all who make this excellent system possible. -- Chris Jewell chrisj@puffin.com PO Box 1396 Gualala CA USA 95445