[ntp:questions] ntpd and hw clock
David Woolley
david at ex.djwhome.demon.co.uk.invalid
Thu Feb 26 23:05:30 UTC 2009
Wayne Liu wrote:
>
> I just wanted to verify that ntpd is NOT attempting to directly set
> hardware clock. It just uses system calls such as settimeofday to set
I am not aware of any platform on which ntpd directly manipulates the
hardware clock, although the only real requirements are that it sets the
same one it reads and that it can read and modify it with fairly high
resolution (precision, in ntpd jargon).
However, even on machines with settimeofday, it only uses that as a last
resort, and should never use it after the startup transients. The
preferred option for Unix is to tell the kernel how much the time
differs from its measurement, and rely on the kernel to use this to
adjust the clock in the way that ntpd expects (which does not mean that
the kernel will apply anything like that full difference before the next
update). The fallback for Unix type systems is to periodically send a
time delta (in which case, ntpd does the smoothing, so the corrections
are less than the measured offset; it also interpolates between
measurements). For NT, it varies the assumed frequency of the clock
used to convert ticks to time of day.
> the time to the Kernel and the time has to be sent to rtc, if so
> desired, by the Kernel itself or separately using e.g. hwclock.
More information about the questions
mailing list