[ntp:questions] ntpq -p "when"

Brian Utterback brian.utterback at sun.com
Mon Nov 12 18:45:56 UTC 2007


Steve Kostecke wrote:

>> Is it set when a sync is requested or received?
> 
> It displays the number of seconds since ntpd last RECEIVED an answer to
> a POLL. It has nothing to do with synchronization.

Actually, it can get a little more complicated than that.

First, remember that although when is printed as an interval,
it is the interval since the REC timestamp for that association
and the current system time, so it can be affected by clock
steps in the intervening time.

Also, it is only the REC timestamp if the REC timestamp is not
zero. Recall that after a certain period of time of non-response,
the polling data for an association is cleared. When that happens,
the REFTIME for the association is used instead. And the REFTIME
can be very nearly the same as the last REC time, or it could be
wildly different.

Brian Utterback




More information about the questions mailing list