From owner-freebsd-questions Thu Apr 6 10:41: 0 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.rdc1.wa.home.com (ha1.rdc1.wa.home.com [24.0.2.66]) by hub.freebsd.org (Postfix) with ESMTP id 0079237BD6A for ; Thu, 6 Apr 2000 10:40:56 -0700 (PDT) (envelope-from drunkle@home.com) Received: from xb.fiddi.com ([24.0.234.124]) by mail.rdc1.wa.home.com (InterMail vM.4.01.02.00 201-229-116) with ESMTP id <20000406174055.HOIW5923.mail.rdc1.wa.home.com@xb.fiddi.com>; Thu, 6 Apr 2000 10:40:55 -0700 Received: from localhost (dave@localhost) by xb.fiddi.com (8.9.3/8.9.3) with ESMTP id KAA43964; Thu, 6 Apr 2000 10:48:33 -0700 (PDT) X-Authentication-Warning: xb.fiddi.com: dave owned process doing -bs Date: Thu, 6 Apr 2000 10:48:33 -0700 (PDT) From: Dave Runkle X-Sender: dave@xb.fiddi.com To: Zhihui Zhang Cc: Dave Runkle , Freebsd Questions Subject: Re: Best Time Synch Utility In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 6 Apr 2000, Zhihui Zhang wrote: > Can you tell me how precision this command rdate can achieve > (ms or us)? > Thanks. > -Zhihui Rdate is just a simple little utility that just plucks time from one server of your choice. It's small and handy, nothing to set up, just give the command and you're done. There are many time servers to choose from, and if all you want is to set your time once a day, then you can use a single-poll utility like rdate. If the server you're polling gets accurate time (don't they all get their time from the US Atomic clock in Colorado?), then you'll have a reasonably correct time. If you *really* need accuracy, precision in timekeeping, then you would need to get one of the utilites that poll multiple servers. Then it really becomes an art - if you're polling multiple time servers, you've got to take into consideration the distance they are away, how long it takes the 'time' to get to you, then you've got to work some sort of average-magic over the data you get from the various time servers, and you've got your own clock-drift to think of too. Figure in TTL values, thrown in some Borax and you've got what... a reasonably correct time. :) So anyway, to answer your question, no I can't tell you precisely how many milliseconds rdate would vary from xnptd or another one. It depends on how accurate you *need* to be. I'm always late anyway, so what do I care about another 1.5 thousandths of a second? See the manpage for ntpq, xntpd, xntpdc. Dennis Ferguson, the writer of xntpd, writes: BUGS Xntpd has gotten rather fat. While not huge, it has gotten larger than might be desireable for an elevated-priority daemon running on a workstation, particularly since many of the fancy features which consume the space were designed more with a busy primary server, rather than a high stratum workstation, in mind. Whew! I think it's 'time' for a cuppa! Dave > > On Thu, 6 Apr 2000, Dave Runkle wrote: > > [snip] > > A really simple one (and it's in the ports) is 'rdate', but > > size ain't everything. ;) The pkg is only 4k in size. It > > can be done via cron, once daily, weekly, whatever, stuck in > > periodic, or even executed from the command line, to set time > > on your machine or just to check time. > > > > # /usr/local/sbin/rdate -s time.u.washington.edu > > > > will set your box to the time at your favorite time-server, or just > > > > $ /usr/local/sbin/rdate -p time.u.washington.edu > > Thu Apr 6 09:36:02 2000 > > $ > > > > to give you the time. User privs to 'print' the time, root to > > actually set the machine. It has a ' -a ' switch to 'gradually skew > > the time' to match the server without a sudden hop. > > > > Dave > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message