Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2000 17:20:45 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        Dave Runkle <drunkle@home.com>, Freebsd Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Best Time Synch Utility
Message-ID:  <20000406172045.A72863@dan.emsphone.com>
In-Reply-To: <Pine.GSO.3.96.1000406150123.1032D-100000@sol.cs.binghamton.edu>; from "Zhihui Zhang" on Thu Apr  6 15:06:17 GMT 2000
References:  <20000406130125.A19508@dan.emsphone.com> <Pine.GSO.3.96.1000406150123.1032D-100000@sol.cs.binghamton.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000406172045.A72863>