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 implements the Network Time Protocol (NTP) and is an alternative to ntpd, a reference implementation of NTP.
Chrony runs on Unix-like operating systems (including Linux and macOS) and is released under the GNU GPL v2. Its first stable release 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:
-
Quick Synchronisation: Chrony synchronises the system clock faster than ntpd, making it ideal for systems requiring consistent time accuracy.
-
Improved Accuracy: Chrony adapts quickly to changes in system clock frequency and supports hardware timestamping, enhancing time synchronisation accuracy.
-
Robust Network Handling: Chrony effectively manages network or peer issues, remembering the system clock state during network downtime and making corrections upon reconnection.
-
Optimised for Unstable Networks: Chrony is suitable for systems with unstable network conditions, making frequent clock updates to maintain accuracy.
-
Ideal for Intermittent Connections: Chrony quickly synchronises the system clock after network disconnections, making it ideal for systems with intermittent network connections.
-
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:
- Chrony GitHub Repository: This is the official GitHub repository for Chrony, where you can find the source code and other related information.
- NTPd GitHub Repository: This is the official GitHub repository for NTPd, where you can find the source code and other related information.
- Red Hat Documentation on Chrony: This is the official Red Hat documentation that explains how to use Chrony in Red Hat Enterprise Linux.
- Red Hat Enterprise Linux 7 System Administrator’s Guide: This guide provides detailed information about the switch to Chrony in Red Hat Enterprise Linux 7.
- StackExchange Discussion on Chrony vs NTPd: This discussion provides insights into the benefits of using Chrony over NTPd.
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.