From owner-freebsd-questions@FreeBSD.ORG Fri Mar 6 08:29:28 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2DEE501 for ; Fri, 6 Mar 2015 08:29:28 +0000 (UTC) Received: from sasl.smtp.pobox.com (pb-sasl1.int.icgroup.com [208.72.237.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8FA6B26E for ; Fri, 6 Mar 2015 08:29:27 +0000 (UTC) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id A466035D4F; Fri, 6 Mar 2015 03:25:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=sasl; bh= WqnDoKSp7X0q6WCpvGvu6QBb0KM=; b=FbguYm8PBAjIurK2WbT8G4pladdpil+h ESL93FITsJ5QdhbDgp9h74sIJwk4kvPWeXBJSj391SA0PTkNo7YrDTX89+nIG2WH QR95Mxfccr+JtBD/ip4ZShKGfjgt8B8XDyTb8P3mTtSOo8G9Erq6XeiUwadN+B// Ynq9/PCAddY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= sasl; b=xCWmDFt9xh3Zr58DwMQYphlV5rBF/rHpvbldzOtkBkiu9x4GDXAYhkUQ KSjcNEhGZtSrzOTO5BauKAKGJu0xohE03SVxIX/YW6so+Xzq99pu4wSPwUkIfTtU zYZov8xGgu2lKvSdXhs1CeYXtBAYE3Yn/6OeXjfj6VETnYqoN7M= Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 487F935D4D; Fri, 6 Mar 2015 03:25:01 -0500 (EST) Received: from almini.rcthomas.org (unknown [208.53.120.31]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 91F9935D4C; Fri, 6 Mar 2015 03:24:59 -0500 (EST) Subject: Re: How to adjust clock frequency in FreeBSD 10.1 ? Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=windows-1252 From: Rick Thomas In-Reply-To: <54EDC2DD.8060307@gmx.de> Date: Fri, 6 Mar 2015 00:24:57 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <61602B0F-2114-4B65-A576-34EDDF94EAFA@pobox.com> References: <54EDC2DD.8060307@gmx.de> To: FreeBSD Questions , questions@lists.ntp.org X-Mailer: Apple Mail (2.1878.6) X-Pobox-Relay-ID: 47DC373E-C3DA-11E4-957E-B058D0B8C469-02150157!pb-sasl1.pobox.com Cc: lokadamus@gmx.de X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 08:29:29 -0000 > On 02/12/15 04:09, Rick Thomas wrote: >> I=92ve got a machine with a really bad clock. When I run NTPD on it, >> the freq goes straight to 500.0 (over a period of a few days) and >> stays there, while the offset grows and grows. >>=20 >> I recently switched this machine from Debian Linux to FreeBSD >> (wanting to learn more about FreeBSD). Under Linux, I used >> adjtimex to modify the TICK value and (once I had converged on the >> right TICK value) NTP was able to stabilize the clock. >>=20 >> Is there an equivalent hack for FreeBSD? On Feb 25, 2015, at 4:41 AM, lokadamus@gmx.de wrote: > You can use a cronjob with ntpdate to synchronize your clock. > But ntpd shouldn=92t run, when ntpdate is used. >=20 As it turns out, current versions of ntpd will do as well as (actually = better than) periodic ntpdate =97 even under such adverse circumstances = as this machine. What it does is to attempt to slew the time using its = normal algorithms until the frequency adjustment gets pegged at 500ppm = and the offset is over 1 second. Then it steps the clock and starts the = game all over. This is better than previous versions of ntpd and xntpd. = They would get to that point and abort =97 on the theory that something = was acutely wrong and needed human operator attention. Current versions = at least have the option of plugging on as best as possible. So, with current ntpd, the system clock is never more than about 1 = second off from network time. And for a normal desktop machine (or ever a small-/home-office server) = that=92s really good enough and I should stop complaining. BUT=85 The trouble is, I=92m a =93time nut=94 and I keep this machine (and a = few others) around specifically as a test case =97 to prove that it *is* = possible to keep good time (sub millisecond offsets from a GPS server on = the same LAN) even with machines that are out of spec, as long as they = are *reliably* out of spec. I=92ve succeeded in twisting Linux to my ends as noted in my original = post (quoted above), but so far I haven=92t found a way to do that for = FreeBSD, short of custom modifications to the kernel and/or ntpd. Any and all suggestions will be gratefully received. Enjoy! Rick=