0

Question: Is there a way to ping or query the date of a client linux computer for the purpose of verifying time synchronization?

Setup: I have two computers on a network. One linux machine (machine A) is a chrony server that is synchronizing its time with a GPS unit. The other linux machine (machine B) is synchronizing to machine A via chrony. In theory, the two machines should be synced, but I don't know when exactly synchronization is complete or if it is synchronized at all.

Is there a way as the host/server computer (computer A) to query or ping the date of the client (machine B) to verify that the client is synced?

aerotec88
  • 3
  • 3

1 Answers1

1

Configure 'chrony' to also act as a server on the client. Use the check_ntp_time command from https://www.monitoring-plugins.org/

# check_ntp_time -H client.example.org -w 3.0 -c 15.0
NTP OK: Offset 0.4999062419 secs|offset=0.499906s;3.000000;15.000000;
Zoredache
  • 130,897
  • 41
  • 276
  • 420
  • I like this solution. I would have never thought to do it that way. I'm currently struggling to build the monitoring plugins as it appears to fail when I go to make it. But that struggle would be related to a different thread. Thanks! – aerotec88 Jan 29 '19 at 21:23
  • What OS are you running? Those modules are pre-packaged and available in apt/yum for centos/debian based distros. – Zoredache Jan 29 '19 at 21:36
  • I'm running ubuntu 18.04. I was able to get it working with apt install. I didn't realize that it was installing correctly, but it just wasn't creating the symbolic links to the functions. Works great! This can be an eloquent solution. Thanks again! – aerotec88 Jan 30 '19 at 15:11