Time – NTP – Linux

Reading Time: < 1 minute

Last Update: 5/28/2024: minor – put in explanation of stratum.

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 just not talk to each other the way you would expect.

apt install systemd-timesyncd
timedatectl set-ntp true
sudo hwclock --show
timedatectl

Some examples:


timedatectl list-timezones
timedatectl set-timezone America/New_York
timedatectl set-timezone EST
timedatectl set-timezone America/Chicago
timedatectl set-timezone EST5EDT
more /etc/timezone

ntpq -p

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

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

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.

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