From owner-freebsd-questions Thu Apr 6 15:20:54 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 680CC37C160 for ; Thu, 6 Apr 2000 15:20:50 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id RAA76048; Thu, 6 Apr 2000 17:20:45 -0500 (CDT) (envelope-from dan) Date: Thu, 6 Apr 2000 17:20:45 -0500 From: Dan Nelson To: Zhihui Zhang Cc: Dave Runkle , Freebsd Questions Subject: Re: Best Time Synch Utility Message-ID: <20000406172045.A72863@dan.emsphone.com> References: <20000406130125.A19508@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.9i In-Reply-To: ; from "Zhihui Zhang" on Thu Apr 6 15:06:17 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Apr 06), Zhihui Zhang said: > > Not even that precise :). rdate only has 1-second accuracy. There > > is no reason to use rdate on FreeBSD at all, since ntpdate has > > millisecond accuracy and comes with FreeBSD. > > I am wondering how to keep a cluster of PCs in sync with each other > within millisecond (loosely synchronized) even if the time of these > PCs is not synchronized well with the outside world. This can be > used in a timestamped concurrency control protocol. I wonder if > ntpdate is good for this purpose. xntpd will do that quite well, even if you only have spotty dialup connectivity to the Internet. Configure a machine with an /etc/ntpd.conf like this: # Pick an ntp server from http://www.eecis.udel.edu/~mills/ntp/servers.htm server 1.2.3.4 # The next 2 lines tell ntpd to use the PC's local clock as a time # source while offline. server 127.127.1.0 fudge 127.127.1.0 stratum 10 # broadcast NTP packets to the local network broadcast 2.3.4.255 driftfile /etc/ntp.drift This will be your primary time source, and will broadcast time packets onto your local network every few minutes. You can configure the rest of the machines to just be broadcast clients ( set xntpd_flags="-b" in /etc/rc.conf ), and they'll sync to the primary server. Just make sure your primary server dials out for a couple hours every once in a while, so it can sync up with a true time source. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message