[ntp:questions] Tool to sample/monitor an NTP server?

Martin Burnicki martin.burnicki at meinberg.de
Tue Nov 10 09:01:25 UTC 2009


PhilipPeake wrote:
> My problem is a client with several systems using a single GPS-based
> NTP server.
> A couple of these systems have had occasions where the clock has
> suddenly stepped around 10,000 seconds backwards:
> 
> Oct 15 13:22:03 xxx xntpd[403]: [ID 261039 daemon.error] time error
> -10369.999603 is way too large (set clock manually)
[...]
> I suspect that the NTP server is having issues, especially since this
> same thing has happened on more than one server. The events are not
> synchronised, so I suspect a short duration time glitch only seen if
> the NTP client happens to poll at the "right" time.
> 
> What I want is a client to poll the NTP server (say once per second)
> and log the time received. A simple perl script can then look for any
> large jumps in the recorded time. This will tell me if the NTP server
> is really at fault.

Reconfigure or set up a new NTP client with peerstats enable. If you can add
a couple of pool servers to that client then the client should mark the
server in question as falseticker and discard it if this happens again, and
the peerstats should clearly indicate that the time on the server has
jumped around.

Or simply a one-line bash script:

while true; do ntpdate -q your-ntp-server|grep ntpdate|tee -a ntpdate.log; \
  sleep 10; done


Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany




More information about the questions mailing list