Time of day Text Mode

Rodney Clowdus rclowdus at kcnet.com
Tue Jul 24 17:04:56 EDT 2001


Sorry about sending that HTML mode Raul.  Hope this will help.  

Apr 
Time 

PC clocks are notoriously inaccurate.  So unstable that
software has been written to try keeping them closer to
the correct time.

One way to get an intermittent adjustment is by use of the
'rdate' command.  It queries the specified hosts and sets
the local system time, not the BIOS clock, to an average
of the times seen on the remote systems.

'rdate -s ns1.kc.rr.com tick.wustl.edu clock.psu.edu' will
set the system time from the three named servers.

Running 'xntpd' is able to keep more accurate time and
can maintain its time across an intermittent connection.

Here is the start of the supplied /etc/ntp.conf file:

===========  Head of /etc/ntp.conf  ================

#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10  


==================================================
The above lines will allow the 'xntpd' daemon to keep running
between dialins and then it will correct from the servers
listed in the /etc/ntp.conf file.

Using several servers allows for some being offline and
still keep accurate time.
===========  Tail of /etc/ntp.conf  ==============

server clock.psu.edu
server clock.tricity.wsu.edu
server dominator.eecs.harvard.edu
server kuhub.cc.ukans.edu
server libra.rice.edu
server louie.udel.edu
server ntp.css.gov
server ntp.tmc.edu
server ntp0.cornell.edu
server ntp2.kansas.net
server ntp1.cs.wisc.edu
server ntp5.tamu.edu
server ntp-0.cso.uiuc.edu
server timex.cs.columbia.edu


==================================================
My system is now on a cable modem so it is now always
connected so it is more accurate than when I was dialup only
but I am amazed at how accurate it can be over an unreliable
medium like the Internet:

[era at allenhome mp3]$ ntptime -r
ntp_gettime() returns code 0 (OK)
  time bca0ede0.75db1000  Thu, Apr 13 2000 20:07:44.460, (.460374),
    maximum error 62784 us, estimated error 37984 us.
ntptime=bca0ede0.75db1000 unixtime=38f66f60.460374 Thu Apr 13 20:07:44 2000
 ntp_adjtime() returns code 0 (OK)
    modes 0x0 (),
offset 88 us, frequency -50.268 ppm, interval 4 s,
    maximum error 62784 us, estimated error 37984 us,
      status 0x1 (PLL),
time constant 3, precision 1 us, tolerance 512 ppm,
  pps frequency 0.000 ppm, stability 512.000 ppm, jitter 200 us,
    intervals 0, jitter exceeded 0, stability exceeded 0, errors 0.
[era at allenhome mp3]$ 

Even the maximum error of 62.784 milliseconds is awesome !


The Weaving Beaver
rclowdus at kcnet.com






More information about the Speakup mailing list