Skip to content

Modern Time Synchronization for Linux

Ever seen a penguin so serious about the time?

As a Linux system administrator, you would be accustomed to using the ntp daemon (ntpd) for time synchronisation on client systems. However this is changing.

Many Linux distributions, including Red Hat Enterprise Linux (RHEL), have replaced ntpd with chronyd as the default NTP client.

Chrony is an implementation of the Network Time Protocol (NTP) and is an alternative to ntpd, which is a reference implementation of NTP.

Chrony runs on Unix-like operating systems (including Linux and macOS) and is released under the GNU GPL v2. The first stable release of chrony was on August 31, 2022.

The chronyd daemon can also be configured as a server to provide accurate time to computer systems in your internal network. In Red Hat Enterprise Linux 7, the default NTP user space daemon is chronyd and it must be disabled if you want to use the ntpd daemon.

Key Benefits of Chrony

Chrony offers several notable benefits for time synchronisation:

  1. Quick Synchronisation: Chrony synchronises the system clock faster than ntpd, making it ideal for systems requiring consistent time accuracy.

  2. Improved Accuracy: Chrony adapts quickly to changes in system clock frequency and supports hardware timestamping, enhancing time synchronisation accuracy.

  3. Robust Network Handling: Chrony effectively manages network or peer issues, remembering the system clock state during network downtime and making corrections upon reconnection.

  4. Optimised for Unstable Networks: Chrony is suitable for systems with unstable network conditions, making frequent clock updates to maintain accuracy.

  5. Ideal for Intermittent Connections: Chrony quickly synchronises the system clock after network disconnections, making it ideal for systems with intermittent network connections.

  6. Smooth Leap Second Handling: Chrony’s ‘leap smear’ feature gradually adjusts the system clock for leap seconds, avoiding sudden adjustments that can cause issues.

Given these benefits, Chrony offers compelling advantages over ntpd for time synchronisation on client systems."

Example Commands

Here are some example commands that can help you get started with using chrony:

  • Start chronyc in interactive mode:
chronyc
  • Display tracking stats for the Chrony daemon:
chronyc tracking
  • Print the time sources that Chrony is currently using:
chronyc sources
  • Display stats for sources currently used by chrony daemon as a time source:
chronyc sourcestats

References:

These references provide comprehensive information about Chrony and NTPd, and the reasons behind Red Hat’s decision to switch to Chrony as the default NTP daemon.