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

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


This is a very good question. I look forward to hearing what chrony experts will say. You can find my idea for obtaining the relative offsets below.

 

If your linux clients are physically near each other and have GPIO pins or other output capability that you can control from userspace, you could do this via physical measurement. I envision the setup to look something like this: an interrupt timer on each client toggles an external pin from low to high and back again at a predetermined time or times, creating an externalized analog pulse. Use a multichannel analog recording device (e.g. a pro-audio digital audio interface) on a separate computer to record the outputs from all machines simultaneously. You should be able to get relatively accurate readings in this way, assuming the timer based interrupts toggle the pin without random delay. I do not know exactly what hardware you are using but for example a Raspberry Pi would be perfect for this experiment. Time resolution of the analog data is about one sample and at a sample rate of 96kHz that’s just over 10 microseconds. Keep the pin high for a couple of samples in order to see it clearly. It is up to you how to coordinate the data recording but for example recording 2*N seconds would insure you capture all events if you set the clients to toggle the external pin every N seconds.

 

Have fun!

 

 

 

From: Matthew Eshleman <matthew@xxxxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, February 9, 2022 3:38 PM
To: chrony-users@xxxxxxxxxxxxxxxxxxxx
Subject: [chrony-users] How to measure relative time diff between multiple clients?

 

Hello,

 

chrony is now working nicely on the target embedded Linux (ARM) device. (Debian, chrony 3.0)

 

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?

 

Thank you very much,

 

Matthew Eshleman



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