12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Keeping Accurate Time with NTP 395Keeping Accurate Time with NTPThe system clock has a variety of uses. It can be used for simple tasks such as includingthe time stamp in a log entry or in an email sent to another user. It is also used for moresystem-critical tasks. If the system time on the nodes of a cluster are too far apart, thecluster might think one of the nodes is not responding and attempt to reboot it. Whencommitting changes to a CVS server, if the time difference between the client and serveris too skewed, the CVS server might refuse to commit the changes. Having an inaccuratesystem time can cause unpredictable behavior that can be difficult to diagnosis.NTP, or Network Time Protocol, allows a system to sync its time with a time server. In <strong>Red</strong><strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>, this operation is performed by the ntpd service. This daemon pollsthe server at certain intervals. If the system time differs from the NTP server, the time isslowly synchronized in small steps. If the time difference is greater than 1,000 seconds,the daemon will exit and write a message to the system log. More than one NTP servercan be specified to retrieve the most accurate time.Where do the time servers retrieve its time? Part of the U.S. Commerce Department’sTechnology <strong>Administration</strong>, the National Institute of Standards and Technology (NIST)provides the Internet Time Service (ITS), which can be used to synchronize the systemclock of a computer from an Internet server. The time signal maintained by NIST isconsidered a Stratum 0 source. Any time sources that retrieve their signals from thisStratum 0 source are considered Stratum 1. Time sources that retrieve their signals from aStratum 1 source are considered Stratum 2, and so on. NIST provides Stratum 1 servers aspart of their ITS. The lower the stratum number, the more accurate the time is.Even though public time servers are available to allow administrators to synchronize thetime on their servers with a known reference, sometimes it is necessary to configure aninternal time server. For example, if all clients synchronize from the same server, they willall receive the same time so that their system times are as close as possible. Also, anadministrator might need to set up his own time server if the clients are inside a firewalland do not have Internet access.This section first discusses how to configure a system to connect to an NTP server to keepaccurate time. Then, it describes how to configure the NTP service on a <strong>Red</strong> <strong>Hat</strong><strong>Enterprise</strong> <strong>Linux</strong> server.Connecting to NTP from a ClientTo configure the system to use one or more NTP servers via a graphical interface, go tothe System menu on the top panel of the desktop and select <strong>Administration</strong>, Date &Time. The command system-config-date can also be executed from a shell prompt tostart the program. Go to the Network Time Protocol tab as shown in Figure 19.3. Thesystem-config-date RPM package is needed to use this program, but it is installed bydefault along with the graphical desktop.19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!