Using the NTP Drift File

No matter how secure the local clock on your computer is, it always has a small defect: either the clock is running too fast or the clock is running too slow. A clock may, for example, have a difference of two seconds every hour; this difference is referred to as the drift factor of the clock. Since NTP is designed also to synchronize time when the connection to the NTP time server is lost, it is important that the NTP process on your local computer knows what exactly the difference is. You can calculate the drift factor by comparing the local clock with the clock on the server that provides NTP time to the local machine. To calculate the right setting for the drift factor, it is important that an accurate time is used on the other server.

When NTP time synchronization has been established, a drift file is created automatically. On SUSE Linux Enterprise Server, this file is created in /var/lib/ntp/drift/ntp.drift. From this file, the local NTP process calculates the exact drifting of your local clock, which allows it to compensate for that. The drift file is created automatically, so as an administrator, you don't need to worry about it. However, you can tune where the file is created by using the driftfile parameter in ntp.conf:

driftfile /var/lib/ntp/drift/ntp.drift

■ Note Remember that NTP is a daemon. Like most daemons, it reads its configuration file only when it is first started. So after all the modifications, use rcxntpd restart to make sure the modifications are applied to your current configuration.

0 0

Post a comment