Setting up time synchronization on Ubuntu

I followed the official Ubuntu time synchronization guide and installed chrony:

sudo apt update
sudo apt install chrony
cat /etc/chrony/chrony.conf
chronyc sources
chronyc sourcestats
sudo systemctl restart chrony.service
apt remove --autoremove chrony

sudo chronyd -q
2018-12-27T13:07:45Z chronyd version 3.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SECHASH +SIGND +ASYNCDNS +IPV6 -DEBUG)
2018-12-27T13:07:45Z Frequency 11.135 +/- 0.461 ppm read from /var/lib/chrony/chrony.drift
2018-12-27T13:07:53Z System clock wrong by -0.000042 seconds (step)
2018-12-27T13:07:53Z chronyd exiting
sudo chronyd -Q
2018-12-27T13:42:54Z chronyd version 3.2 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SECHASH +SIGND +ASYNCDNS +IPV6 -DEBUG)
2018-12-27T13:42:54Z Disabled control of system clock
2018-12-27T13:42:54Z Frequency 11.135 +/- 0.461 ppm read from /var/lib/chrony/chrony.drift
2018-12-27T13:43:04Z System clock wrong by -0.000382 seconds (ignored)
chronyc tracking
Reference ID    : 596DFB17 (ntp3.vniiftri.ru)
Stratum         : 2
Ref time (UTC)  : Thu Dec 27 13:42:31 2018
System time     : 0.000077742 seconds slow of NTP time
Last offset     : +0.000023625 seconds
RMS offset      : 0.001595543 seconds
Frequency       : 11.566 ppm fast
Residual freq   : +0.012 ppm
Skew            : 1.943 ppm
Root delay      : 0.015475650 seconds
Root dispersion : 0.000337465 seconds
Update interval : 64.1 seconds
Leap status     : Normal

Also I tried to determine if my network card supports hardware timestamping by using ethtool:

sudo apt update
sudo apt install ethtool
ifconfig
sudo ethtool -T eth0

On HyperV with Ubuntu 18.04:

Time stamping parameters for eth0:
Capabilities:
        software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)
        software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
        software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none

On VPS with Ubuntu 16.04:

Time stamping parameters for eth0:
Capabilities:
        software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)
        software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
        software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none

I also tried ntpd:

sudo timedatectl set-ntp no
timedatectl status
systemctl status systemd-timesyncd
sudo apt-get install ntp
sudo ntpq -p
sudo apt remove --autoremove ntp
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 0.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 1.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 2.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 3.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
 ntp.ubuntu.com  .POOL.          16 p    -   64    0    0.000    0.000   0.000
-ntp1.vniiftri.r .MRS.            1 u   25   64    1   13.946   -1.111   4.106
*time100.stupi.s .PPS.            1 u   25   64    1   14.310   -0.295   2.172
-89.221.207.113  194.58.202.148   2 u   23   64    1   11.253   -5.280   1.743
-sufferer.okonti 194.190.168.1    2 u   24   64    1   13.290   -3.017   1.832
-mail.sonur.ru   .PPS.            1 u   25   64    1   44.403    8.674   1.940
-ground.corbina. 89.109.251.23    2 u   23   64    1   20.832    5.191   1.450
 cello.corbina.n 194.58.202.20    2 u   22   64    1   22.406    4.182   1.891
+mx1.user3849.ru 89.109.251.22    2 u   25   64    1   20.483    1.421   2.581
-62.249.138.35   212.19.6.218     2 u   25   64    1  158.728   19.434   1.533
+78.140.251.2    194.190.168.1    2 u   25   64    1    1.267   -0.093   1.735
-178.19.245.161  85.114.26.194    2 u   24   64    1   18.044    4.848   1.746
 golem.canonical 193.79.237.14    2 u   35   64    1   50.818    0.669   0.000
 95-165-138-248. 89.109.251.24    2 u   22   64    1   12.725    0.096   1.223
 alphyn.canonica 192.36.143.150   2 u   35   64    1  123.046   -1.983   0.000
 pugot.canonical 17.253.52.253    2 u   34   64    1   53.750   -1.003   0.000

1 Response to Setting up time synchronization on Ubuntu

  1. dmitriano on January 2, 2019 at 8:37 AM:

    Setting the timezone:
    timedatectl list-timezones | grep Mos
    sudo timedatectl set-timezone Europe/Moscow

Leave a Reply

Your email address will not be published. Required fields are marked *