3

I have a PC directly connected to a GPS clock with PPS signal that sets the clock to an accuracy of 5 µs (!) or less (shows in NTP as a normal server).

Now I want to measure how bad the internal software clock is. Therefore I am searching for an option to actually poll a server and don't set the time but actually let it go off.

I could mark the server as noselect in the ntp.conf file, but then ntpd won't write the loopstats file.

How to let the ntpd write the loopstats file with the offset to the server, but don't acutally set the time?

Thank you!

hugh
  • 43
  • 4

2 Answers2

1

You can use ntpq to query a timeserver without adjusting the clock. Schedule that with cron, and write output to a logfile.

dunxd
  • 9,632
  • 22
  • 81
  • 118
1

The ntpdate command line tool provides the -q (query) option for querying a remote NTP server and displaying the offset from your local clock. For example:

$ ntpdate -q us.pool.ntp.org
server 216.93.242.12, stratum 2, offset 0.004806, delay 0.04530
server 72.26.217.210, stratum 2, offset 0.003129, delay 0.13052
server 173.203.202.87, stratum 2, offset 0.006828, delay 0.08769
 2 Feb 06:32:54 ntpdate[61498]: adjust time server 216.93.242.12 offset 0.004806 sec

The interesting data here is that the very end: offset 0.004806 sec. If this is the metric you're most interested in then you should be all set. It doesn't provide the level of details of the loopstats file, but it should help out.

larsks
  • 43,623
  • 14
  • 121
  • 180