[ntp:questions] Wanted: Quick way to check that all workstations have the correct NTP time.

David Woolley david at djwhome.demon.co.uk
Fri Feb 9 08:22:48 UTC 2007


In article <45CBCB91.5060302 at comcast.net>,
Richard B. gilbert <rgilbert88 at comcast.net> wrote:
> nicough at gmail.com wrote:
> > 10 workstations (no internet access) running w32time, pulling time
> > from my local NTP server.

> > How can I query my local NTP server, to check that all 10 workstations
> > have the correct time?

> ntptrace will show you the offset from the server's clock.

ntptrace is unsupported and may be deprecated.  It uses mode 6 packets
(ntpq) but w32time doesn't support them.  If w32time supported them one
could use ntpq directly.  (ntptrace is a script that uses ntpq.  I think
it only exists in Unix script form.)  Whilst ntptrace can be run on the
server against a remote ntp client, it still has to be run separately
against each such client. ntpq can be run with multiple addresses on
the command line.)

The ntpd support tools are not designed for testing that all clients
are  synchronised, as there may be 100,000s of clients.  Configuring the
clients to be servers may allow ntpq peers to give a consolidated display,
but it would be advisable to first find a restrict option that prevented
their times being believed.  Caution: w32time, or at least pre-2003 SP1
versions, falsely reports stratum 2, when it has ever been synchronised,
although I'd generally be wary of this tactic, even when using a compliant
client implementation.  Clients will only get checked every 20 minutes
if you do this.

Otherwise you have to access the clients individually, albeit remotely,
which is what you have to do with the event log.  The only step you
avoid is having to trawl for the relevant entry in the event log.  With
w32time, you should still be able to use ntpdate to measure the offset,
but the status information may be false if the client has ever synchronised.
Better would be to install the reference implementation of ntpd 
(Meinberg's is a build of that) on the clients, which will make 
ntpq work.

If you want a single command to check, you will have to write a script,
but you should also be able to write one to poll and scan the event
logs remotely.

(ntpdc monlist may give some indication, but I don't think it tells you
if the client successfully synchronised.)




More information about the questions mailing list