Software Archive
Read-only legacy content
17060 Discussions

Time Drift and using NTP for syncing your system clock (including VMs)

Steven_T_Intel
Employee
709 Views

Time Drift

Time drift is when a VM loses ticks and its system clock then becomes inaccurate. This phenomena has been well documented on the Web.

Using NTP for synchronizing the system clock

Overhead in using NTP

The observed overhead appears to be less than 1%. On Windows 2003, which uses SNTP (Simple Network Time Protocol), there are 2 UDP packets received and 1 UDP packet sent by the system under test. On SLES 9 SP1, which uses NTP, there is 4 TCP packets received and 1 TCP packet sent. On a lightly loaded system, updating every 10 minutes is sufficient. On a heavily loaded system, it is recommended to update every 5 minutes. I have set updates to occur every minute, without a significant load added to the system.

Windows 2003

There are just a few steps necessary to have your Windows 2003 system synchronizing with your NTP server, even from within a Virtual Machine.

Specifying your Internet Time Server

Right click on your time display. Click on the Adjust/Time selection. Click on the Internet Time tab. Enter the IP address or Name of the NTP server you wish to synchronize with.

Creating a Scheduled Task to synchronize your system

Create a batch file

You will need to create a batch file for your scheduled task to execute. The batch file needs only one line:

w32tm /resync

Create the Scheduled task

Go to C:WindowsTasks folder. You will see an entry to Add a scheduled task. Click on it to bring up the wizard. Browse to specify your newly created batch file as the executable for the new task. Specify daily execution. After you have created the task, use the advanced features to execute it every 10 minutes or 5 minutes as necessary.

SLES 9 SP1

There are just a few steps necessary to have your LINUX system synchronizing with your NTP server, even from within a Virtual Machine.

Specifying your Internet Time Server

Edit the file /etc/ntp.conf. Specify your server by adding a line like:

Server 192.168.1.63

Creating a cron entry to synchronize your system

Create a shell script

Create a bash shell script with the lines:

#! /bin/bash

/etc/init.d/xntpd restart 2>&1 > /dev/null

Modify crontab

Edit /etc/crontab to add an entry for your newly created shell script. It would look like (to execute every 5 minutes):

0,5,10,15,20,25,30,35,40,45,50,55 * * * root /root/myNewScript

0 Kudos
1 Reply
Steven_T_Intel
Employee
709 Views
I found the following on the Novell site about SLES 10 SP1, which is similar to this post.

https://secure-support.novell.com/KanisaPlatform/Publishing/510/3858673_f.SAL_Public.html


0 Kudos
Reply