[ntp:questions] Synchronization and Non-Synchronization status
jaiprabhu at softhome.net
Fri Feb 19 17:57:21 UTC 2010
Assuming the following config:
restrict default kod nomodify notrap noquery
server <server1> minpoll <N> maxpoll <M>
server <server2> minpoll <N> maxpoll <M>
server <server3> minpoll <N> maxpoll <M>
I need to do the following:
1. Set a global "sync" status when we are sure that NTPd is synchronized
to *at least* one server.
2. Set a global "not-sync" status when we are sure that NTPd is
not-synchronized to *any* of the configured server, when there was a
prior "sync" condition
There are two parts to my problem:
1. How do I find out the "sync" and "not-sync" status from NTPd
2. How do I make NTPd tell me when it reaches "sync" and when it is
"not-sync". It's probably ok if I can use parse a log message generated
by NTPd to figure this out.
Can someone please tell me a reliable way to determine these two things.
For 1 I could perhaps read the 'ntpq -pn' billboard and look at the
tally codes. If there is a sys.peer ("*") in the list then I guess we
are in "sync" status. For 1, I am not sure what the "not-sync" condition
More information about the questions