Chris Williams asked:
I have set Chrony to sync with 4 NTP servers (config file below). When I run
chronyc tracking and
chronyc sources, it looks like the servers my machine is connecting to for NTP are not correct. I’d expect to see the list of servers I specify in the chronyd.conf file when I ask what server is being tracked and which sources it’s using.
$ chronyc tracking Reference ID : 184.108.40.206 (220.127.116.11) Stratum : 3 Ref time (UTC) : Thu Feb 18 19:05:11 2016 System time : 0.000564536 seconds fast of NTP time Last offset : +0.000280794 seconds RMS offset : 0.000322653 seconds Frequency : 19.616 ppm fast Residual freq : +0.003 ppm Skew : 0.053 ppm Root delay : 0.039604 seconds Root dispersion : 0.000406 seconds Update interval : 1042.6 seconds Leap status : Normal
$ chronyc sources 210 Number of sources = 4 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^+ ntp.newfxlabs.com 2 10 377 754 -415us[ -143us] +/- 31ms ^* 18.104.22.168 2 10 377 221 +1823us[+2104us] +/- 21ms ^- nox.prolixium.com 2 10 273 22 +4137us[+4137us] +/- 93ms ^- triangle.kansas.net 2 10 376 34m -2860us[-2291us] +/- 103ms
Config file (all defaults except for the server portion at the top):
$ cat /etc/chrony.conf # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #server 0.rhel.pool.ntp.org iburst ##server 1.rhel.pool.ntp.org iburst ##server 2.rhel.pool.ntp.org iburst ##server 3.rhel.pool.ntp.org iburst server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org server 3.us.pool.ntp.org # Ignore stratum in source selection. stratumweight 0 # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift # Enable kernel RTC synchronization. rtcsync # In first three updates step the system clock instead of slew # if the adjustment is larger than 10 seconds. makestep 10 3 # Allow NTP client access from local network. #allow 192.168/16 # Listen for commands only on localhost. bindcmdaddress 127.0.0.1 bindcmdaddress ::1 # Serve time even if not synchronized to any NTP server. #local stratum 10 keyfile /etc/chrony.keys # Specify the key used as password for chronyc. commandkey 1 # Generate command key if missing. generatecommandkey # Disable logging of client accesses. noclientlog # Send a message to syslog if a clock adjustment is larger than 0.5 seconds. logchange 0.5 logdir /var/log/chrony #log measurements statistics tracking
$ timedatectl Local time: Thu 2016-02-18 14:13:33 EST Universal time: Thu 2016-02-18 19:13:33 UTC RTC time: Thu 2016-02-18 19:13:33 Time zone: America/New_York (EST, -0500) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: no Last DST change: DST ended at Sun 2015-11-01 01:59:59 EDT Sun 2015-11-01 01:00:00 EST Next DST change: DST begins (the clock jumps one hour forward) at Sun 2016-03-13 01:59:59 EST Sun 2016-03-13 03:00:00 EDT
The servers you’ve specified:
server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org server 3.us.pool.ntp.org
are, as the names suggest, pools. When you look up one of these names, you may get any of hundreds of public NTP servers in the US, (and thousands worldwide if you chose some other countries) which are part of the pool. These are delivered via round-robin DNS.
When you view
chronyc sources, you see the actual servers in the pool which were used.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.