Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Event Synchronization Using NTP

Tags:

python

ntp

I would like to synchronize two events between two (or more) wire networked Linux machines. Can I use NTP to do this?

NTP seems to be mostly focused on synchronizing to a time server, where I need two machines to be synchronized to each other. There is a subtle difference there. For example, if one machine is located half as many hops away as a second machine from the time server, I might be able to get better synchronization if I try to synchronize the two machines to each other directly instead of synchronizing both to a time server.

A slightly different question: If I were to use NTP, what would be the best way to schedule events? A cronjob or at script? Could I get better (sub second) synchronization if I were to use a library like this one.

Finally, does anyone know of any time synchronization software packages that are suited to synchronizing two (or more) machines together, not necessarily synchronizing to a time server.

Thanks for any help.

like image 215
devin Avatar asked Dec 30 '25 07:12

devin


1 Answers

You might try delegating one machine as the master, and the remaining machines as slaves. When the synchronized events should occur, the master triggers the slaves to commence.

The synchronization would be limited only by the latency (ping) between the machines, and you wouldn't need to worry about system clocks consistency.

like image 71
earldouglas Avatar answered Jan 01 '26 21:01

earldouglas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!