DRAFT: This module has unpublished changes.

Emily Schultheis

July 14, 2009

APL Internship

STANDARDIZATION OF TIMESTAMPS

through Internet or within a LAN

Context:

This research was conducted as the result of the Navy CSS project whose prototype will be applied to the autonomous underwater detection and classification of mines. Visual input provided by side-scan sonar is analyzed using an adapting software package resembling the predecessor AMDAC algorithm. This system is used to link the timestamps provided by each unit of a local network of several computers and the prototype.


Introduction:

Clocks calculate and display time, but some are more accurate than others. Atomic clocks for example are known as some of the most consistent of timekeepers; as a result, other clocks' times are adjusted or confirmed using these as a standard. The methods presented here are used to correct and standardize computers' sense of time to match a known reliable source or each other. This system uses the principle of Network Time Protocol (NTP), a hierarchal system determined by the reliability (stratum) of sources. The lower the stratum, the higher the reliability of the source. For instance, a stratum of zero would indicate a primary source from which the following stratum (one), would adjust their times before relaying the information to the next stratum (two). The second stratum would then indicate their adjusted times to the third stratum; third to fourth, and so on. Because this system will not have reliable access to the Internet when functioning on the open water, a local NTP hierarchy will be established with one computer as the sole stratum 0 server to broadcast to the rest of the private network.

A personal computer has its own default time-maintenance system that functions without access to the Internet, a local network, or other sources. It relies on the collaboration of two internal clocks: one software, and the other hardware. The software clock calculates approximate time by counting electric pulses from an emitter; a certain number of pulses should approximate a second.  However, the frequency of these pulses can be accidentally influenced by even just the user running a program. Errors are compounded, and eventually this system can stray minutes from the original time, let alone the actual time. A general rule is the longer a computer/software clock is left to run, the more erroneous it will become.

 

Fortunately, the secondary hardware clock is slightly more accurate, though not without its problems. Thanks to a separate battery reserve, the hardware clock remains ticking even after the computer has been shut down. The software clock copies the time provided by the hardware clock at each reboot, and in some cases will take additional adjustments from it at predefined intervals. The primary flaw of the hardware clock is that it is sensitive to external temperature, a realistically uncontrollable factor that influences the time progression too much to be helpful in time-reliant experiments.

 

All in all, even an inexpensive wristwatch maintains better accuracy than the clock found as the default in even high-tech computers. Almost all computers have thus been supplemented with a safeguard: a manual adjustment by the user to fix whatever might go wrong. Again though, this allows the computer clocks to begin with the right time, but the fundamental problem is that their interpretation of a second is not necessarily accurate.

 

NTP provides a third option that supplies greater accuracy and no user involvement aside from preliminary installation. A NTP daemon will continuously synchronize the user's clock with one of greater accuracy. Often, the user has the opportunity to select his/her choice of reference clock; sometimes several clocks are used to confirm the computer's time to further reduce any possible errors resulting in a bad connection or power spike.

 

The NTP hierarchy in this experiment will not compare time to an external source found through the Internet, but will be isolated from all but the units directly linked in this local area network (LAN). It is of greater importance to standardize time stamps within the context of the experiment than the secondary goal to maintain precise consistency with the outside world in terms of time. One computer (running Windows XP) is set aside as the server who will broadcast its time to all other components (clients) of the local network. This way, though the time system may not be accurate, it will at least be consistent. Analysis may not be able to determine the accuracy of chronicle distance in portions of a second between each marker, but it will reveal which events were simultaneous if they do have the same time stamp. Clients of the network include units running Linux Ubuntu OS and the prototype.

System Requirements:


Methods for Establishing the Network:

  1. Connect all units in the LAN to a central hub

  2. Using the ping function, verify that the connection between each of the clients and the server is operational. (In terminal of Linux or command window of Windows)

Methods for Establishing the Server:

  1. Download and Install a copy of NetTime: Server&Client v3.0 from www.google.com

  2. Imitate the selection shown in Figure 1.

  3. Click 'new' to add the names and IP addresses of all clients included in the LAN.

  4. Imitate the remainder of the selection shown in Figure 2.

  5. Imitate the selection shown in Figure 3.

  6. Imitate the selection shown in Figure 4.

  7. The log shown in Figure 4 display an example list of software events, most notably, success in syncing the client computer's time. Also shown are undefined errors corrected by readjusting the software settings to that shown in these images. See the following section for troubleshooting help.

  8. Imitate the selection shown in Figure 5.

  9. Imitate the selection shown in Figure 6.

Methods for Establishing Linux Ubuntu Clients:

  1. Install NTP → (in terminal, type “sudo apt-get install ntp”)

  2. Go to System tab → Administration → select the “Clock synchronization service (ntp)”

  3. Right click on computer clock (top right of screen)

  4. Under “Configuration”, select “Keep synchronized with Internet servers”

  5. Under “Time servers”, click “Select Servers” and add the IP address of the chosen LAN server unit. Make sure that this server is the only source selected.

Troubleshooting:

Errors indicated when syncing the clients' time may result from:

  • Ping IP address from client to server and vice versa. If the packets are not received,

    • Check the physical connection or wireless strength

    • Verify the correct IP addresses are in use

  • Compare the selections in the given figures to each of the pages in the documentation.

  • Compare the client and server IP addresses within the appropriate fields of the documentation.

  • Refresh the status of the transmission (under the “Service” tab).

  • Restart the computer (server and/or clients).

  • With Linux clients, under “System” → “Administration” → “Services” → verify that “Clock synchronization service (ntp)” is selected.

DRAFT: This module has unpublished changes.