Re: [chrony-users] How to measure relative time diff between multiple clients?

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Wed, Feb 09, 2022 at 02:38:04PM -0600, Matthew Eshleman wrote:
> We would like to measure relative time differences between multiple clients
> versus a known decent NTP server.
> 
> Are there any documented best practices, tips, tricks for this effort?

You need something more accurate than the SW-timestamping network
port used by the NTP client. It depends on your hardware. If it has a
free GPIO pin, you could use it to timestamp a GPS PPS signal, or
generate PPS signal on each client and compare them with each other or
with the GPS PPS signal on a scope or with a soundcard (if it has a
sufficient sample rate), as was suggested in this thread.

Here is a GPIO PPS generator:
https://github.com/jsln/pps-gen-gpio

If you don't have a (fast) GPIO pin, you can consider generating PPS
on the memory bus:
https://github.com/mlichvar/pps-gen-ram

This is more difficult to setup and analyze. If the computer has
on-board memory, you would need find the right pin on one of the
memory chips and attach/solder the probe there. As there is always
some unrelated memory activity on the bus, the analysis requires a
statistical approach. The PPS rate needs to be high enough to see
through the noise, but low enough to see the maximum expected offset.
The "average" aquisition mode on a scope can be very useful here.

There is an observer effect. As the generator fully loads the CPU, it
impacts the errors in SW timestamping of NTP packets and can change
the offset of the clock. Running the generator only for brief periods
of time, e.g. right after the client received a response, can minimize
this effect.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/