[ntp:questions] Re: ntp sanity limit kills ntp daily

Richard B. Gilbert rgilbert88 at comcast.net
Tue Jun 14 15:24:15 UTC 2005

Mark wrote:

> Colliermeister wrote:
>> Ulrich Windl wrote:
>>> Michael Ward <michaelward at sprintmail.com> writes:
>>>> Hello All,
>>>> I've configured my FC3 system to run ntp successfully at boot time 
>>>> and ntp
>>>> seems to run successfully for about a day.  However, every night 
>>>> the clock
>>>> looses some 1200 seconds while the system is busy making backups. 
>>>> When ntp
>>>> figures this out, it refuses to update the clock because this is 
>>>> classified as
>>>> insane, and terminates.
>> Might this help ? ...
>> panic panic
>>     The argument is the panic threshold, by default 1000 s. If set to 
>> zero, the panic sanity check is disabled and a clock offset of any 
>> value will be accepted.
>> http://www.eecis.udel.edu/~mills/ntp/html/miscopt.html
> Can someone explain why motherboard companies don't just
> spend an extra $2 and install real quartz based clocks on
> motherboards so all this nonsense about losing time would
> be a non-issue?
> ms

They do spend the $2 and there is a quartz crystal installed.  You don't 
get much for $2 these days but it's not THAT bad!

The problem is not in the hardware but in the software.  The clock we 
are talking about is the software clock maintained by the O/S.   The 
hardware divides the crystal oscillator output by a programmable value 
to produce "ticks" at some predictable rate 100 Hz, 1000 Hz, 1024 Hz or 
whatever else struck the designer's fancy.  The "ticks" interrupt the 
processor and the processor takes a couple of microseconds from whatever 
it's doing to add one tick to the current time.  The O/S disables or 
masks interrupts for short periods in order to perform some operation 
that cannot be safely interrupted.  When interrupts are disabled for 
more than one "tick" the clock loses one or more ticks.

Most, or all, versions of Windows and Linux exhibit this problem!  Other 
operating systems; e.g. BSD and Solaris, do not.

More information about the questions mailing list