3

I need to compare results which come from two different laptops. Each laptop has a different set of sensors and in order to correctly compare them I need to have the same timestamp on both laptops. They are not connected to public internet, but if necessary, I can use a router to make them communicate locally over ethernet.

I installed chrony on both computers, but I didn't understand how to setup the master and how to configure the client.

I've checked these instructions:

Master:

driftfile /var/lib/chrony/drift
local stratum 8
manual
allow 192.168.165
smoothtime 400 0.01

Clients:

server master iburst
driftfile /var/lib/chrony/drift
logdir /var/log/chrony
log measurements statistics tracking

but I didn't understand if I need to specify these commands in command-line or if I have to create a text file named "drift" containing these instructions and put it inside /var/lib/chrony/ and then restart chrony.

Can you help me, please? I really cant understand how to use chrony!

Thank you!

1
  • I tried to find some tutorial on Google but I wasn't able to find out how to setup the configuration for the master. Still don't know if I need to create a new file or if I need to modify something else.. Jun 17, 2016 at 1:41

1 Answer 1

3

the default config in chrony comes with most of this already, no need to change drift or logfile. Your example pretty much looks like the section "Isolated networks" in man chrony.conf so there you can find more details.

The changes you need are all in /etc/chrony.conf afterwards restart the service via systemctl restart chrony.

In addition to the default config you only need:

a) on master:

# make it serve time even if it is not synced (as it can't reach out)
local stratum 8
# allow the IP of your peer to connect (subnet not specific IP)
allow 192.168.XX

b) on client:

# set the servers IP here to sync to it
server <IP> iburst
# remove the default servers in the config

The rest you had in your example is either already in the default configuration or doesn't fit your use case. For example smoothtime will make the served time less jumpy, interesting as you have no high quality clock on your master. But if your use case just wants them the same no matter how jumpy, then this is actually not what you want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .