Helpdesk TWiki > Helpdesk > LinuxTimeServer TWiki webs:
AIX| Classes | HALBOD | HLUG | Helpdesk | Library | Main | Samba | TWiki |
Helpdesk . { Home | Changes | Index | Search | Go }

Keeping Correct Time on Small Networks

Yet Another D@#% Time HOWTO (YADTH©)

It is surprisingly easy to make a computer automatically keep correct time, yet every HOWTO, Tutorial, or set of instuctions makes it way more complicated than it needs to be.  There is also a wealth of information on the web about the subject, almost too much information.  Worst of all, much if not most of it is too technical for the average user. 

   Here is a well intentioned example from the "father" of Internet time keeping: 
      http://www.eecis.udel.edu/~mills/ntp/html/build/quick.html

Quick Start

gifFAX test image for SATNET (1979).

The baby panda was scanned at University College London and used as a FAX test image for a demonstration of the DARPA Atlantic SATNET Program and the first transatlantic Internet connection in 1978. The computing system used for that demonstration was called the Fuzzball . As it happened, this was also the first Internet multimedia presentation and the first to use NTP in regular operation. The image was widely copied and used for testing purpose throughout much of the 1980s.

Last update: 01:01 AM UTC Saturday, March 20, 2004



For the rank amateur the sheer volume of the documentation collection must be intimidating. However, it doesn't take much to fly the ntpd daemon with a simple configuration where a workstation needs to synchronize to some server elsewhere in the Internet. The first thing that needs to be done is to build the distribution for the particular workstation and install in the usual place. The Building and Installing the Distribution page describes how to do this.




The panda is cute & its caption is historically interesting, but they are a distraction. 

"For the rank amateur the sheer volume of the documentation collection must be intimidating." is great:  Easy to understand and too, too true. 

"However, it doesn't take much to fly the ntpd daemon with a simple configuration ... " Oops! What's a daemon?  Just lost the average user. . .

 

This paper will present some simple solutions:  easy to understand, easy to implement. 
I will present 3 cases:  Microsoft® Windows workstations, a Linux Time Server, & GNU/Linux workstations. 

"Why would you want to do that ?"

Good question ... If you want some other peoples' thoughts:  If you now think that sync'ing your computers to an accurate external time source is a "Good Thing™", read on; otherwise, …

Disclaimer

  1. No Warranty — If your system breaks, you get to keep the parts. :-)
  2. Really No Warranty — I haven't finished learning about this yet. ;-)
  3. Double No Warranty — This is a work in progress, all of the little I know isn't up here yet. :^o
I hope someone finds this useful, and that folks will fill in areas like Mac stuff that I know nothing about. 

Case 1:  Microsoft® Windows workstations

Approach 1 — use a free commercial product

The simplest and most direct approach to this problem is to download & install SymmTime™ 2004 from Symmetricom They will ask for (mandatory) Name, e-mail, Company, State, Country info, but I have good reason to believe that they won't check it too closely.  If you really  object to giving them any personal date, try this: Save it in an appropriate place, scan it for malware, & install. 
In Win NT, 2k, XP make sure you do this as an Administrator.  If you are running as a regular user, as you should be, <Shift>-Right Click or <Shift>-<Application Key> will bring bring up a special version of the Application menu that has "Run as" as the 2nd choice (Win 2k).  Choose this, and you can run the installer as Administrator without having to log out. 
When it's done you will have a nice 4 zone clock on your desktop & a matching icon in your system tray.  You can add (up to 30 total), delete (down to only 1), & customize (click on the hammer icon in the lower right corner of the display).  More important, your PC's clock will be automatically synchronized with "the most accurate time available" (per their help file…:). 

Pro's & Con's of Approach 1

Pro's:  Con's: 

Approach 2 — Use Free NIST Software

The National Institute of Standards and Technology (NIST) is a U. S. Government agency that maintains an official time scale for commerce in the United States.  As part of that mission, they offer free software to the public. 

Pro's & Con's of Approach 2

Pro's:  Con's: 

Approach 3 — Use built-in Microsoft® facility

Pro's & Con's of Approach 3

Pro's:  Con's: 

.  .  . 



It is also desirable (another "Good Thing™") to have no more than 2 of them getting their time from the 'net. 

  1. Because more than 2 is a waste of other peoples' resources, and therefore impolite. 
  2. Because more than 2 may be a waste of your own resources, and therefore stupid. 
[fixme: insert more links here] .  .  .  .  .  .  . 

Scope & Assumptions

This document applies to networks similar mine: 

This document does not  cover: 

.  .  .  .  .  . 

References (Links)

  1. Time Precision HOWTO: 
    Managing Accurate Date and Time
    Avi Alkalay
    http://tldp.org/HOWTO/TimePrecision-HOWTO/index.html`
    This is the "Bible" on the subject as well as the ispiration and major source for this paper
  2. pool.ntp.org: public ntp time server for everyone
    http://www.pool.ntp.org/ — This is the wonderful public server pool
    http://www.pool.ntp.org/#use — and how to use it ("How do I use pool.ntp.org?")

  3. The Windows Time Service
    By Shala Brandolini and Darin Green, Microsoft Corporation
    Published:  April 2001
    Summary:  http://www.microsoft.com/windows2000/techinfo/howitworks/security/wintimeserv.asp
    Download:  http://download.microsoft.com/download/2/0/f/20f61625-7b2a-4531-b007-1c714f1e51b7/wintimeserv.doc
    Note:  This is a pain to read as a .doc, so I converted it to .pdf using OpenOffice.org

  4. Windows Time Service Issues
    Greyware Automation Products, Inc.
    discussion from a vendor trying to sell a (rather expensive) product, some good background
    http://www.greyware.com/software/domaintime/product/w32time.asp

Background

This last one is especially seductive, but it contains NO Linux/UNIX instructions, & everything else is geared to having all your hosts connecting directly to external servers ... exactly what we are NOT doing here.

Eye Candy

Google Searches


W2k Registry entries:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
"LocalNTP"=dword:00000000
"Period"="SpecialSkew"
"type"="NTP"
"ntpserver"="192.168.xxx.yyy"
"Adj"=dword:0001872c
"msSkewPerDay"="-1728.0000"

My results 1 day later:
# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 LOCAL(0)        LOCAL(0)         5 l   59   64  377    0.000    0.000   0.015
+<myisp>.com     172.20.0.1       3 u  601 1024  377   39.950  -21.081   0.896
*<anuplink>.com  24.30.206.134    2 u  495 1024  377   17.719  -29.706   0.305
+<reference>.org ntp-cup.externa  2 u  542 1024  377   90.797  -22.410   3.604
Commentary: 

The "*" in the first column means its favorite is the Stratum 2 (col 3, "st") server with the low jitter.  Low jitter is good jitter. 

The "+"'s in the first column mean the other two are working fine (ntp "likes this server"). 

The polling interval for the 3 external servers (col 6 "poll") has reached the default maximum (1024).  This is also good — it means that the clock is well sync'ed and the ntp daemon is in maintenamce mode. 

The "reach" (col 7) for all servers is 377, which is both maximum & perfect.  It means that the ntp daemon has not failed to reach any of them in its last 8 tries. 

"This is an octal representation of an array of 8 bits, representing the last 8 times the local machine tried to reach the server. The bit is set if the remote server was reached."

BTW, the LSB (least significant bit) seems to represent the most recent attempt. 

If your binary arithmetic is rusty, 37710 = 111111112 = 2^8 — i.e. no recent failures. 

And don't forget: 
There are 10 kinds of people in the world ... 
Those who understand binary and those who don't. 
.  .  LinuxTimeServerAdvanced

LinuxTimeServerDrafts



-- RickArchibald - 26 Jun 2004

Topic LinuxTimeServer . { Edit | Attach | 5B%5EA-Za-z%5D">Ref-By | Printable | Diffs | r1.14 | > | r1.13 | > | r1.12 | More }
Revision r1.14 - 01 Aug 2004 - 19:20 GMT - RickArchibald
Parents: WebHome
Copyright © 2003-2007 by F. A. Archibald III & the contributing authors