[ntp:questions] Synchronization and Non-Synchronization status

Steve Kostecke kostecke at ntp.org
Fri Feb 19 23:49:54 UTC 2010

On 2010-02-19, Jaiprabhu <jaiprabhu at somewhere.in.this.world> wrote:

> Jaiprabhu wrote:
>> Many thanks.
> Anyone?


> The thing I am most interested in resolving is, in which part of NTPd,
> and how, can I determine that there are no valid peers left (either
> they are unreachable or are not reliable servers) and therefore
> determine the current global synchronization status to be "not-sync".
> One of ideas I am toying with is to edit ntp_proto.c and going through
> the list of all configured servers at the end of clock_select() and
> verifying that at least one of the servers is a sys.peer. If not,
> then I send a signal out to tell whoever is listening that NTP is
> "not-sync".
> The option of looking at the billboard every poll interval (excecuting
> 'ntpq -pe') and looking for the "*" tally code is always present but
> I would want to avoid this polling mechanism. Instead, I would prefer
> receiving of the "not-sync" status from withing NTPd itself.

ntpd already provides a trap mechanism for sending out event
information. There is an implementation of a trap client in the
./scripts directory of the distribution.

I suggest you take a look at this before you go off and re-invent the

Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project - http://support.ntp.org/

More information about the questions mailing list