ml4ai / tomcat

ToMCAT: Theory of Mind-based Cognitive Architecture for Teams
https://ml4ai.github.io/tomcat/
MIT License
21 stars 7 forks source link

Host a time server on ToM or CAT, then have all computers in lab sync to that time server #275

Open eduongAZ opened 2 years ago

eduongAZ commented 2 years ago

@rchamplin and I decided to host the time server on ToM. We do so using the following steps:

Install NTP server on ToM computer

sudo apt install ntp

Verify that the NTP server is running

sudo service ntp status

We then sync CAT time to ToM computer with the following steps:

Install ntpdate on CAT

sudo apt install ntpdate

Specify IP and hostname of ToM by adding the following line to the end of the /etc/hosts on CAT

192.168.0.24 tom

Check if CAT's time is synchronized with [[ToM time server]]

sudo ntpdate tom

the output should ideally show a time offset between the two systems.

Disable the timesyncd service on CAT so that CAT sync time with [[ToM time server]]

sudo timedatectl set-ntp off

Install NTP on CAT

sudo apt install ntp

Configure the /etc/ntp.conf file to add [[ToM time server]] as the new time server on CAT by adding the following line to the end of /etc/ntp.conf file on CAT

server tom prefer iburst

Restart NTP on CAT to make the changes above take effect

sudo service ntp restart

We observed that the difference between CAT and ToM is about 2 to 7 milliseconds.

eduongAZ commented 2 years ago

We are having trouble syncing iMac time with ToM time server.

First, we tried setting the time server on Tiger through system setting interface as ToM's IP, but the time difference between ToM and Tiger about 120 milliseconds.

Second, we tried running the following command on Tiger

sudo sntp -sS 192.168.0.24

Tiger reported a few time-out, and then printed some numbers, but the time difference between Tiger and ToM is still about 120 milliseconds.

We are investigating a way to sync Tiger time to ToM time server.