Time – NTP – Linux

Reading Time: 2 minutes

Last Update: 3/20/2025

In this segment we are going to talk about a number of NTP tools. We will review Microsoft’s NTP; Linux NTP and discuss hardware solutions. Integrating time/NTP into your organization is important in event analysis. Also applications and services can become cranky if servers have drifted too far apart. For example if you have multiple Exchange servers deployed in the same environment and they drift too far apart they might not talk to each other the way you would expect.

For UBUNTU

apt install systemd-timesyncd

For SUSE … you probably didn’t escape the system installing chronyd

If you are experiencing problems you might consider running:

systemctl stop chronyd.service
systemctl restart chronyd.service


Then you can use chronyc tracking to display time info.

Set to true

timedatectl set-ntp true


Show the time

sudo hwclock --show


Display timedatectl (Good for Ubuntu and SUSE)

root@s3:/home/ubuntu# timedatectl
               Local time: Mon 2025-03-10 22:33:17 EDT
           Universal time: Tue 2025-03-11 02:33:17 UTC
                 RTC time: Tue 2025-03-11 02:32:50
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
              NTP service: n/a
          RTC in local TZ: no


Some examples:


timedatectl list-timezones


timedatectl set-timezone America/New_York


By in large using something like a specific Time Zone includes processing of Daylight Savings time adjustments – whereas a setting like “EST” is more set in stone.

timedatectl set-timezone EST


Just another example

timedatectl set-timezone America/Chicago


Just another example

timedatectl set-timezone EST5EDT

more /etc/timezone

ntpq -p

date --set "23 Sep 2018 11:04:00"



Stratum: Aside: A “stratum” is hierarchy used to “rank” and delineate the quality of the time keeping.

A Stratum 0: device is a high-precision time keeping device. Typically something that is deriving it’s time either through an Atomic Clock; GPS; or a Radio Clock. Typically a Stratum 0 device would not advertise it’s service.

A Stratum 1 device – typically get’s it’s time from a Stratum 1 device. A Stratum 1 device may “peer” with with other Stratum 1 devices as a check.

References:
https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-16-04
https://en.wikipedia.org/wiki/Network_Time_Protocol

This entry was posted in Linux, Networking, ntp. Bookmark the permalink.