Time of day

Rodney Clowdus rclowdus at kcnet.com
Tue Jul 24 12:00:01 EDT 2001


Kansas City Linux User GroupI use the following tips for keeping accurate time and it works great!   Having a list of time servers always insure that someone is up and running.  Let me know what you think Matt. 
Rodney
rclowdus at kcnet.com

     Kansas City Linux User Group  


--------------------------------------------------------------------------------
  a.. Home 
  b.. Mailing list 
  c.. Talks 
  d.. LUG Reviews 
  e.. Links 
  f.. Regional LUGs 
Ed's tips of the month
  a.. Apr 
    a.. 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 !
	    
  b.. March 
    a.. bc 

bc -l
4*a(1)
3.14159265358979323844
obase=2
4*a(1)
11.001001000011111101101010100010001000010110100011000010001101001010
obase=16
scale=40
4*a(1)
3.243F6A8885A308D313198A2E037073448
^D
	    
  c.. February 
    a.. ps 
    ps auxf to view related processes as a tree. 
    b.. setleds 
    setleds -D +num to set numlock on as a default. 


--------------------------------------------------------------------------------
 |  
Linux ® is a registered trademark of Linus Torvalds in the United States and other countries. 

Last modified on Thursday, 07-Jun-2001 11:46:48 CDT 

Comments to the webmaster 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linux-speakup.org/pipermail/speakup/attachments/20010724/68a56f1d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Tux-KC.jpg
Type: image/jpeg
Size: 4422 bytes
Desc: not available
URL: <http://linux-speakup.org/pipermail/speakup/attachments/20010724/68a56f1d/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vh40.png
Type: image/png
Size: 799 bytes
Desc: not available
URL: <http://linux-speakup.org/pipermail/speakup/attachments/20010724/68a56f1d/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcss.gif
Type: image/gif
Size: 1547 bytes
Desc: not available
URL: <http://linux-speakup.org/pipermail/speakup/attachments/20010724/68a56f1d/attachment.gif>


More information about the Speakup mailing list