[ntp:questions] Extracting ntpq like information programmatically
David Woolley
david at ex.djwhome.demon.invalid
Fri Mar 29 21:41:12 UTC 2013
Claudio Carbone wrote:
> On 29/03/13 19:26, Brian Utterback wrote:
>> As unruh said, if there was a way to improve the accuracy of the
>> measurement over the network like that, NTP would already be doing it.
>
> If so why doesn't the offset oscillate?
> If NTP were a real compensation system, it should oscillate around the
> setpoint.
> Instead I noticed a nearly static offset, at least during the 15 minutes
> observation time.
You are observing on a time scale much shorter than the loop time
constant. ntpd has an adaptive time constant, and once it has gained
initial lock, that becomes quite long, as it assumes that offsets are
due to measurement errors, e.g. due to differential delays out and
return. Also, in your case, you may actually have been using the same
best sample for the whole 15 minutes.
This strategy will generally give the best solution if the temperatures
of the oscillators are stable. Where ntpd can have problems is in not
ramping down the time constant fast enough if the temperature changes
and the local clock frequency changes.
I'm not sure of the exact oversampling rate, but even after the
approximately 1 out of 8 sampling for the best of the last 8, I believe
it is still oversampling in relation to the loop time constant.
More information about the questions
mailing list