[ntp:questions] LOCL clock reachability not 377?

Rob nomail at example.com
Thu Jul 31 19:49:51 UTC 2014

Harlan Stenn <stenn at ntp.org> wrote:
> Rob writes:
>> > A reboot is a restart and on a restart you need an external source for
>> > the seconds. 
>> Why?  The time is copied to the CMOS clock regularly, and one could
>> expect that during the short reboot the CMOS would not drift away so
>> much that the time could not be synced to the PPS unambiguously.
> Except when the CMOS battery is insufficiently alive.
> H

That is no problem unless you actually remove power from the machine.

In this case it was a "reboot" command so no power ops involved at
all, but even a "halt" will not cause problems in this case.  Only
when you pull the plug (e.g. to do some hardware work), the battery
comes into action.

No, what is the real problem is that the CMOS clock has its own crystal
and prescaler to divide down to one-second pulses, and the only thing
that can be loaded is the counter.  So you have a +/- .5 second uncertainty
when just loading a new time into the CMOS clock and retrieving it later
on a reboot.

This could probably be circumvented by storing the measured subsecond
offset of the CMOS clock in a disk file during shutdown (or when updating
the CMOS clock) and using that during the boot procedure.

More information about the questions mailing list