1

I'm working on a project which will acquire a lot of timestamped data at fairly high resolution (50 samples per second) over a very long period of time (years).

The solution includes various failover mechanisms. During the lifespan of this project it's reasonable to assume that some data-loggers will need to be replaced. IE some will come online once data acquisition has already stated by others.

Given the nature of the data, it would be very bad if some data were recorded with inaccurate timestamps, even a handful of seconds out. NTP should be solid enough for this solution, and even if network is lost for a few hours the drift on the internal clock should be too small to cause a significant problem. Actually we care less about data during internet outages for esoteric reasons.

What bothers me is what happens when a data-logger is rebooted. Or booted for the first time. I want the device to reliably stabilise its system time using NTP before it meshes into the failover solution.

How can I determine the current reliability of the system time with respect to either chrony or ntpd. That is, how can I get a value from either, telling me:

  • how recently they last synchronised
  • If possible, a confidence value in the last update*

By Confidence I mean something along the lines of total round trip time of the NTP packets... which is of course part of the NTP specification.

Philip Couling
  • 17,591
  • 5
  • 42
  • 82
  • I don't have the spec to hand but ntpq will show you when it's synchronised, also how far away from "correct" time it is. I'm away for the weekend but can look if no-one else gets there first – roaima Apr 28 '23 at 22:12
  • 1
    @roaima Oh that's interesting. Full answer definitely welcome. What's nice about ntpq, reading the manual, is that it can work remotely. That might even embed into an element of our failover logic. – Philip Couling Apr 28 '23 at 22:21

0 Answers0