[ntp:questions] ntpd stays synced after loosing gps

Dave Hart davehart_gmail_exchange_tee at davehart.net
Thu May 12 09:15:02 UTC 2011

On Thu, May 12, 2011 at 07:13 UTC, Nickolay Orekhov <nowhere at mail.ru> wrote:
> Will the server without sync lower it's stratum somewhen? According to tos
> maxdist maybe?

No, the only change in system variables will be the increased rootdisp.

> What system variable can I use? I think that good OS clock = (stratum < 16)
> && ( rootdisp < MAX_DISP ) && ( offset < MAX_OFFSET )
> Stratum needs to be checked cause just started server have offset and
> rootdisp = 0
> Am I right?

I can't judge what is "good" for you, but I will note you can check
for leap != 11 (in binary, the default base for the leap variable
output in ntpq) to avoid believing the 0 offset and dispersion at
startup.  Note leap 00, 01, and 10 are all indicating a synchronized
ntpd, while leap == 11 indicates unsynchronized.  You may find the
stratum test redundant if you test leap.

Dave Hart

More information about the questions mailing list