[ntp:questions] System Time (date) Does Not Agree With Hardware Clock Time (hwclock)

gldickens3 gldickens3 at gmail.com
Mon Jul 23 17:53:38 UTC 2007


Hello,

I am new to both ntp and this newsgroup. I recently configured and
began using npt on my Linux server. I am running CentOS release 4.5
version 2.6.9-55.0.2.ELsmp and npt version 4.1.1b-r5 which was
preloaded with my CentOS Linux distribution.

I am having a problem with my system time, reported via the "date"
command in that it doesn't agree with the hardware clock time,
reported via the hwclock command. The "date" command reports time that
is always 23 seconds behind the time reported by the "hwclock --show"
command.  It appears that the time reported by "hwclock" is accurate
in that it agrees with other ntp servers that I query.  Whereas, it
appears that the time reported by "date" is inaccurately slow by 23
seconds.

As an example, at the exact moment when other ntp servers report the
time as 11:00:00 AM EDT then I get the following results from this
nested Linux shell command line:

# date;/sbin/hwclock --show
Fri Jul 20 11:59:37 EDT 2007
Fri 20 Jul 2007 11:00:00 AM EDT  -0.015949 seconds

Can anybody tell me how to make "date" time accurately equal "hwclock"
time?

FWIW, when I set the two times to be equal and accurate with other ntp
servers with "hwclock --hctosys" then the following occurs:

- Both "date" and "hwclock" will remain correctly in agreement with
other ntp servers for several minutes.
- Then, the jitter values for the servers with which I am syncing go
up to around 8700 (my jitter values are normally less than 10).
- Then the ntpd daemon quits syncing (no asterisk "*" next to any
server) and the jitter values go to around 18000.
- After which the offsets go to 23000 milliseconds (my offset values
are normally under 100 milliseconds) although both the "date" and
"hwclock" command continue to agree with other ntp servers.
- Following all this, and after about 15 minutes, everything goes back
to how it was in the beginning with the "date" time trailing the
"hwclock" time and other ntp servers by about 23 seconds and with
offsets under 100ms and jitter less than 20.

In any event, I hope that someone can offer some advice as to how to
fix my clocks so that "date" = "hwclock" which agree with other ntp
clocks within a reasonable amount of accuracy.

Thanks in advance for your help!

Gordon




More information about the questions mailing list