[ntp:questions] Query reg offset and STEP state

David Woolley david at ex.djwhome.demon.invalid
Mon Aug 26 00:03:00 UTC 2013


On 25/08/13 10:51, Chandrasekar P wrote:
> Hi NTP folks,
> I have a quick query regarding the offset.
> I have a box(PC), where the offset is in a negative figure(i guess
> -2.900).
> Does it mean that the box's time is higher than the NTP server ?

No.  It means that the estimate of the time on the box is higher (might 
be lower - I'd have to think hard about the sign) than its estimate of 
the time on the server.  The former is subject to resolution limits, and 
scheduling delays.  The latter is subject to the former (particularly 
values on the server, and to the asymmetry in outbound and input transit 
times for the NTP message.  The actual error could have a different sign 
from the offset.  That will be true almost 50% of the time if ntpd has 
acquired lock and there are no asymmetries.  Actually, I think it will 
be more true if there are significant asymmetries.

>
> then the box's time will get reduce till the offset comes close to zero
> right.

A non-zero offset will cause the frequency to be adjusted to try to 
bring the offset to zero, but not for many poll cycles, so the 
adjustments will be driven by the average offset.  The average offset 
should be a lot smaller than the median of its absolute value.  The 
direction of the adjustment depends on the sign of the offset.

There is also an integral component.

>
> I have a another query regarding the STEP state :(
> After reaching the STEP state, it will clears all the filters and start
> from the scratch.
> But to start from the scratch, when will the NTP client(box) will query
> the NTP server, since i saw the stratum as 16 and everything empty.

It should poll at approximately intervals of 2^minpoll seconds.  I'm 
fairly sure that poll rate gets reset in this case.  Actually, isn't the 
step state the 15 minute confirmation state, rather than the restart state?

If you really need to know, it is best to check the code.



More information about the questions mailing list