Skip to content

NTP in Ubuntu 16.04 LTS

This took me a little while to find the answer to…Hopefully this get indexed well for other’s Google searches…

How does Ubuntu 16.04 LTS and later handle NTP?

16.04 LTS time sync appears to be handled by sytemd specifically “timedatectl”

timedatectl status
Local time: Wed 2016-11-30 17:45:18 CST
Universal time: Wed 2016-11-30 23:45:18 UTC
RTC time: Sun 2016-12-04 06:50:39
Time zone: America/Chicago (CST, -0600)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

Config is

/etc/systemd/timesyncd.conf

More info here: Time Synchronisation with NTP

Published inTech

2 Comments

  1. Running older versions of Ubuntu server (14.04, 12.04) and CentOS 7 I’m still unclear as to the best practice for insuring Ubuntu 16.04.02 LTS stays in synch. I have always relied on ntpd on older Ubuntu versions and chrony on CentOS 7 but ntpd is not installed by default on Ubuntu 16.04. I do know that I can install it and set it up as usual but is that the best practice?

    I did review the man page for timesyncd.conf but note that by default nothing is in /etc/systemd/timesyncd.conf. I do notice when I type timedatectl that NTP synchronized is YES and when I type systemctl status systemd-timesyncd I can see that it tries to synch with ntp.ubuntu.com (fallback); however, there seems to be several timeouts waiting for that server. It also appears it only did it once when the system first came up.

    I have decided to go back to using ntpd on my production servers because I am comfortable with that process but still not sure if I should be using it in conjunction with timedatectl or if I should be using cron to keep time in sync if using timedatectl without ntpd.

    • Chase Chase

      I agree that the details with sytemd/timedatectl/timesyncd are very lacking compared to ntpd, and I think the reason behind that is this is a Simple NTP client, not a real NTP service. It only syncs to one server (even if you specify multiple), I have no idea the interval, and it does not support clients. I don’t really have a need to get more in depth than that in my environment but I do think that if accurate time is important to you and your environment that removing and replacing with ntpd is the correct path.

      Instructions

Leave a Reply

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