Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS Basics > Issue <<  867 of 908 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 13030
Last update: 07-03-08
Issue:
How can I make the ntp client sync with the ntp server more accurately?
Resolution:

After configuring ntp client sync with the ntp server, occasionally the sync is not accurate. In some critical enviroments even 2 or 3 seconds is not allowed. The example below shows how to make the sync more accurate.

Edit the /etc/sysconfig/ntpd, which is the key configuration for ntpd. Add , the output is as below:

# Set to 'yes' to sync hw clock after successful ntpdate.
SYNC_HWCLOCK=yes

All the servers have two kinds of clocks; the system clock and the hardware clock. The system clock is owned by the OS, and the hardware clock is owned by CMOS. When the Server is running, it usually provides it's system clock as the clock resource. However, when the server is shutdown, the system clock will sync to hardware and when rebooted the hardware clock will sync to system.

The problem occurs because their may be some offset between the two clocks, and if the server has been shutdown for a longtime, when it's rebooted the hardware clock may sync to system that may not be accurate.

If SYNC_HWCLOCK=yes is used in /etc/sysconfig/ntpd, it means when the ntpd is startd it will first sync with hardware clock, that will reduce the offset and error between the two clocks.

The ntpdate command can be set in cronjob, but it's not recommended, because ntpdate will directly sync the two clock but ntpd makes the sync little by little. So if the deviation between the two clocks is very big, the adjustment of ntpdate will make cause problems with others services, for example syslogd and klogd.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS Basics > Issue <<   867  of  908  >>