From owner-freebsd-questions@FreeBSD.ORG Fri Dec 21 19:39:47 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFAE216A419 for ; Fri, 21 Dec 2007 19:39:47 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id 75EAD13C4CC for ; Fri, 21 Dec 2007 19:39:47 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from vanquish.pitbpa0.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTP id 71449EBC3B; Fri, 21 Dec 2007 14:39:46 -0500 (EST) Date: Fri, 21 Dec 2007 14:39:45 -0500 From: Bill Moran To: John Webster Message-Id: <20071221143945.ce9992ee.wmoran@potentialtech.com> In-Reply-To: <073F818C772E47BF16B6A94F@vortex.es.net> References: <20071218165521.GA37529@bewilderbeast.blackhelicopters.org> <343753.78466.qm@web44811.mail.sp1.yahoo.com> <20071221112303.19619c39.wmoran@potentialtech.com> <7BEE288E7C218E96DB9E8AA0@jw-laptop.dhcp.lbnl.us> <20071221132440.31ded74f.wmoran@potentialtech.com> <62F8888810A130657FBCAF47@vortex.es.net> <20071221135129.ee20677e.wmoran@potentialtech.com> <073F818C772E47BF16B6A94F@vortex.es.net> X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org, "Michael W. Lucas" , shinny knight Subject: Re: timekeeping on jail servers 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: Fri, 21 Dec 2007 19:39:47 -0000 In response to John Webster : > > --On Friday, December 21, 2007 13:51:29 -0500 Bill Moran wrote: > > > In response to John Webster : > > >> > Not generally suitable for cron because it can take longer to slew > >> > than it does for the next cron execution to occur, which would then > >> > result in multiple ntpdate programs fighting each other (not sure > >> > what the effect of this would be). > >> > >> If I were doing it I would write a script with locking in order > >> to ensure multiple jobs don't fight. Simple. > > > > Umm .... > > > > At that point, why not just run ntpd? You've basically replaced it > > with a script anyway. > > > > My suggestions are based on the OP about ntpd binding to everything. > > > > Besides, it's not that easy. As Chuck pointed out, ntpdate calls > > adjtime() and exits, which means an adjustment might already be in > > progress when you you call it again. I don't know if ntpdate checks > > the return pointer from adjtime() to avoid multiple adjustment > > requests. > > Just out of curiosity, why run it more that once a day? Or for > that matter every couple of days? There is the matter of "how accurate does your time really need to be?" I worked a place where many computers were used for employees to clock in/clock out. Synchronizing time once a day, the clocks would drift enough that employees who showed up on time and left on time would appear to have arrived late and/or left early (up to 5 minutes a day drift). Of course, this is hardware-dependent and even environmentally dependent (computers connected to clean power sources with consistent environmental temperature seem to keep more accurate time in my experience) Other common applications are even more sensitive. If you run NFS or other file sharing, you can run into all sorts of ugliness if time skews more than a few seconds. Web applications can be notoriously buggy if either the server or the client is off by more than a few seconds. With all those potential problems looming, why would you use anything other than a full-blown ntp daemon? I just can't see the excuse for making up other solutions. -- Bill Moran http://www.potentialtech.com