ntpd and cmos clock update

John Hay jhay at icomtek.csir.co.za
Tue Aug 30 17:10:15 GMT 2005


> : > : That's why I always thought that ntpd did not work in FreeBSD 5.x!
> : > 
> : > ntpd works perfectly on FreebSD 5.x
> : 
> : I think he refers to the fact that after a reboot, the time has to be
> : adjusted by n seconds, so obviously the time that FreeBSD thought it
> : was just before the reboot was just as far off...  hence ntpd wasn't
> : working...
> 
> When ntpd is running, ntpd sets the time.  The TODR is just something
> that gets things kinda close for ntpd to actually do its work.  Of
> course, since all my 5.x experience is done on machines that get the
> time from GPS and the local time doesn't matter at all, I might not
> have noticed something like that.

What happens is something like this: The machine boots and ntpd starts
and maybe step the time and the tod clock is also set. If you reboot
at this stage the tod clock is normally close enough that ntpd does
not need to step, but if the machine runs for a long time, ntpd will
keep FreeBSD time correct but the tod clock will slowly drift away.
Then if you reboot or recover from a power failure, ntpd has to step
the time again. If the tod clock could be synced periodically, the
step on startup can mostly be avoided.

I would also like something like this, maybe with a switch to enable/
disable it.

John
-- 
John Hay -- John.Hay at meraka.csir.co.za / jhay at FreeBSD.org


More information about the freebsd-hackers mailing list