e-mail   
 Menu
  Home
  Download
  Top 10 Downloads
  Last 15 New Files
  Web Links
  Tips
  Last 15 New Tips
  NLM Programming
  Admins Club





SUPLA System
Internet of Things




Installation and Administration






Polish Forum SUSE


 
Who's Online

 There are currently,
8 guest(s)
that is (are) online.
 


Technical Information

Back to List of Categories

Technical Information about
  An Introduction to JBoss
  An Introduction to LDAP: Part 1-LDAP Primer
  An Introduction to LDAP: Part 2-Using LDAP to Create a User Authentication
  AppNote: Configuring an OpenSLP DA on OES or SUSE LINUX Enterprise Servers
  AppNote: Installing Oracle 10g on SLES9
  Developing PHP Scripts with SUSE LINUX
  Encrypting Data Partitions
  How to configure MySQL for NSS File System in OES for Linux
  How to install Webmin - A Web-Based System Admin Tool
  How to Run Binary-Only Application Packages on Various Versions of Linux
  Integrating Novell OES Linux iManager, Virtual Office and Welcome Page with Apache 2.2.2, Tomcat 5.5.17 and Sun Java2 1.4.2
  Keeping Sync with a Remote NTP Server
  Lab Guide for installing Open Enterprise Server with Linux Kernel
  Make your computer a SUSE LINUX Enterprise Server with a normal cable connection.
  Novell SLES9 vs Windows2003 Server
  NTP Active Servers
  Patching Open Enterprise Server with rug/Red Carpet FAQ
  Performance Tuning Installation Tips
  Remote administration

Technical Information
 Keeping Sync with a Remote NTP Server

Printer-friendly version

Posted: 18 May 2005

Background

All computers have their own internal clocks, implemented in hardware and software. These clocks have acceptable accuracy, but are not anywhere near perfect - they all exhibit "clock drift," letting their time drift by several seconds a day. While desktop users may not be inconvenienced by drift, system administrators cannot tolerate it. When running a server, it is essential to keep the system's time synchronized with the other servers it interacts with.

Linux provides a means to keep time in sync via the Network Time Protocol (NTP). A computer running the NTP client frequently probes one or more NTP servers and synchronizes its time with that of the server(s).

YaST provides a means to set-up one or more remote NTP server via the "NTP Client" module found under "Network Services." A list of public NTP servers can be found here. OES servers can also be configured to serve as NTP servers. See the Novell Network Time Protocol Administration Guide for OES (pdf) for more details.

The Problem

When adding a remote time source in YaST, there are always at least two sources added to /etc/ntp.conf: the local computer and the remote time source. When the NTP daemon starts, it initially synchronizes the system time to the time server's time, then periodically performs the same synchronization in the background. If the time server is not immediately available, then NTP falls back on the default local time source.

Some users have observed that their system time is being synchronized to the remote server's time when xntpd initially starts, but then is only being synchronized to their local time thereafter. An example /var/log/ntp would look like this:
2 May 08:11:05 ntpd[2965]: synchronized to LOCAL(0), stratum 10
2 May 08:11:05 ntpd[2965]: kernel time sync disabled 0041
2 May 08:14:17 ntpd[2965]: synchronized to LOCAL(0), stratum 10
2 May 08:26:13 ntpd[2965]: kernel time sync enabled 0001
2 May 10:33:35 ntpd[3489]: synchronized to LOCAL(0), stratum 10
2 May 10:33:35 ntpd[3489]: kernel time sync disabled 0041

Also, executing xntpdc -p would reveal that the time is synchronized to the LOCAL, not the remote server (see the entry with the '*').
#  xntpdc -p

     remote           local      st poll reach  delay   offset    disp
=======================================================================
*LOCAL(0)        127.0.0.1       10 1024  377 0.00000  0.000000 0.11856
=prv-time.provo. 137.65.211.18    2 1024  377 0.00041 -262.1380 0.11470

The Solution

The solution is to make NTP more persistent when probing the remote time server. This is done by appending the flags burst and iburst to the remote server; burst tells NTP to send a burst of eight packets to the remote server instead of one when the server is reachable, and iburst tells it to do the same when the server is not reachable. The result is faster and more reliable synchronizations.

These options can be added in the "NTP Client" YaST module by selecting "Complex Configuration" then editing the remote server. The options are added in the "Options" field and are space-delimited. They can also be added directly to the server in /etc/ntp.conf as follows:
server 137.65.1.123  burst iburst
A healthy /var/log/ntp will then look like this:
29 Apr 15:24:58 ntpd[6892]: synchronized to 137.65.1.123, stratum 2
29 Apr 15:24:58 ntpd[6892]: kernel time sync disabled 0041
29 Apr 15:26:15 ntpd[6892]: kernel time sync enabled 0001
2 May 08:10:41 ntpd[6892]: ntpd exiting on signal 15
2 May 08:13:33 ntpd[6684]: synchronized to 137.65.1.123, stratum 2
2 May 08:13:33 ntpd[6684]: kernel time sync disabled 0041
2 May 08:13:45 ntpd[6684]: kernel time sync enabled 0001






Since 2003

Portal posiada akceptację firmy Novell Polska
Wszystkie materiały dotyczące produktów firmy Novell umieszczono za zgodą Novell Polska
Portal has been accepted by the Novell Polska
All materials concerning products of Novell firm are placed with Novell Polska consent.
NetWare is a registered trademark of Novell Inc. in the United States and other countries.
Windows is a trademark or a registered trademark of Microsoft Corporation in the United States and other countries.
Sybase is a registered trademark of Sybase Inc. in the United States of America.
Other company and product names are trademarks or registered trademarks of their respective owners.