[ntp:questions] Server down but time staying in sync

Daniel Kabs daniel.kabs at gmx.de
Thu Jul 16 08:40:30 UTC 2009


On Tuesday 14 July 2009, raju dantuluri wrote:
> We have observed that the NTP client never appear to be out of sync
> even though the NTP server is down! It's important for us to know that
> the server is down/not available!
> ...
> $ ntpq -np
>      remote           refid      st t when poll reach   delay
> offset  jitter
> =======================================================================
>======= *172.16.1.49     209.123.234.24   3 u  740 1024  377    0.514
> -3.268   1.617

Why not compare "when" against "poll", e.g. if "when" exceeds "poll" by 
factor of two, you can assume that the server is down.

> $ ntpq -np
>      remote           refid      st t when poll reach   delay
> offset  jitter
> =======================================================================
>======= *172.16.1.49     209.123.234.24   3 u  53m 1024  370    0.514
> -3.268   1.617

Obviously your ntpd configuration does not allow ntpd to switch to another 
server. So the "tally sign" stays put.

Try adding a second "internal" server to the ntp.conf like
server 127.127.1.1
fudge 127.127.1.1 stratum 14

This way ntpd should switch to the "internal" server when the "external" 
server is not available for some time.

Cheers
Daniel



More information about the questions mailing list