You are here: Administration & Maintenance Manual > Appliance Administration > NTP and Drift Correction > Correcting Time Drift without NTP

Correcting Time Drift

All computer systems show clock drift over time - the system time gradually deviates from accurate or "true" time. For many applications it is important that servers and clients be working to the same time standard, and that drift be prevented or corrected.

Various methods have been devised to correct drift. The simplest and most reliable way to do so is to implement Network Time Protocol and receive accurate time signals from a server that is dedicated to that task and maintained to a very high standard of accuracy. This is discussed in the NTP topics of this Administration section, and in the Concepts section of this Help.

Some situations might not permit maintaining a constant connection to an external time-data source (NTP server).

Here we show an example of drift (over several days) and describe how to correct it using the appliance's sysconf drift local drift-correction commands.

 

First, establish the drift that exists for your appliance

Begin drift measurement. This also sets the time.

Note: the Luna SA appliance must run uninterrupted for several days to allow a time drift to occur. Other testing can be done, but nothing that would potentially change the system time (no power-cycles, for example) or the exercise  would need to be restarted.

Issue the drift start command:

 

[myluna] lunash:>sysconf drift startmeasure -c 15:12:15

Setting the time to 15:12:15 and recording data for drift correction mechanism.

Current date and time set to: Tue Dec 9 13:47:45 EST 2008

Command Result : 0 (Success)

[myluna] lunash:>

 

At any time, you can check the status of the drift measurement to ensure it has not been interrupted:

 

[myluna] lunash:>sysconf drift status

Drift measurement started on: Tue Dec 9 13:47:45 EST 2008

Measurement has yet to be stopped.

Command Result : 0 (Success)

 

After issuing the start command, allow the system to run for several days before issuing the stop command. The appliance's drift system enforces a 3 day minimum - here's what it says if you attempt a shorter period:

[myluna] lunash:>sysconf drift stopmeasure -c 08:53:30

Measuring drift correction data on this appliance.

Drift measurement is not complete. This command must be run at least 3 days

after the 'sysconf drift start' command, in order to ensure accuracy of the

measurement.

 

It is up to you how you acquire an accurate time, in order to establish the drift and its correction. One method would be to use NTP on a different computer that has no connection to the Luna SA. In this example we used a 4 day span. Issue the “stopmeasure” command with the current and accurate time:

 

[myluna] lunash:>sysconf drift stopmeasure -c 14:53:00

Measuring drift correction data on this appliance.

Storing measured drift of 8 seconds/day in internal configuration files.

Use the command 'sysconf drift init' to initialize drift correction.

Command Result : 0 (Success)

[myluna] lunash:>

 

The sysconf drift stopmeasure command stops the count and then compares the <currentprecisetime> that you typed in, against the calculated time (since you ran the sysconf drift startmeasure command). The difference in seconds, the total drift, is then divided by the interval over which the measurement was running, in order to calculate a drift-per-day value.

In order for the drift to be properly corrected for operation, it is best to initialize drift correction immediately after stopping the measurement cycle, otherwise it might be necessary to redo the measurement. Note that the drift time stored is the time reported when measurement was stopped.

 

[myluna] lunash:>sysconf drift init -c 14:58:15

Measuring drift correction data on this appliance.

Setting the time to 14:58:15 and initializing drift correction of 8 seconds per day on this

appliance. The time will be adjusted daily to compensate for this drift.

Use the command 'sysconf drift reset' to disable drift correction.

Date and time set to: Fri Dec 12 14:58:15 EST 2008

Command Result : 0 (Success)

[myluna] lunash:>

 

For this example, we allow the system to run for a few more days and check the time to ensure the correction is maintained. To ensure that drift correction is still in effect, use the sysconf drift status command in addition to status time.

 

[myluna] lunash:>sysconf drift status

Drift measurement started on: Tue Dec 9 13:47:45 EST 2008

Measurement stopped on: Tue Dec 9 13:47:45 EST 2008

Current drift correction is: 8 seconds per day

(Note that drift correction may be manually set.)

Command Result : 0 (Success)

 

For purposes of example, set the drift rate manually to ensure that it is also effective:

 

[myluna] lunash:>sysconf drift set

Enter the value to be used for drift (in seconds per day): 8

This value will overwrite the previous value of the drift that may have

been measured. If you are sure that you wish to overwrite it, then type

'proceed', otherwise type 'quit'

> proceed

Proceeding...

NOTE: The new value will not take effect until 'sysconf drift init' is run.

Command Result : 0 (Success)

[kuso] lunash:>sysconf drift init -c 09:11:45

Measuring drift correction data on this appliance.

Setting the time to 09:11:45 and initializing drift correction of
8 seconds per day on this appliance. The time will be adjusted daily
to compensate for this drift.

Use the command 'sysconf drift reset' to disable drift correction.

Date and time set to: Mon Dec 15 09:11:45 EST 2008

Command Result : 0 (Success)

[myluna] lunash:>

In a lab situation, this should sit for at least 3 days to ensure that the drift correction is effective.