What is Chrony?
Chrony is a modern implementation of the Network Time Protocol (NTP) used to synchronize a Linux system’s clock with accurate external time sources. It consists of two main components:
chronyd– the daemon that continuously synchronizes the system clock.chronyc– the command-line utility used to monitor and control thechronydservice.
Chrony is designed to perform well on systems with unstable network connections, virtual machines, and servers that are not always powered on. Compared to the traditional ntpd, it typically synchronizes the clock faster and maintains better accuracy.
How Chrony Works
The chronyd daemon periodically contacts one or more configured NTP servers. For each server, it:
- Measures the network delay.
- Calculates the time offset between the local clock and the remote server.
- Filters multiple measurements to remove inaccurate samples.
- Gradually adjusts the local clock to match the reference time.
Rather than making abrupt time jumps, Chrony usually slews the clock, meaning it changes the clock speed slightly until the correct time is reached. This prevents issues for applications that rely on time moving forward continuously.
Common Monitoring Commands
View configured time sources
chronyc -n sources
Example output:
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.1.1 2 6 377 30 -25us[ -40us] +/- 1200us
^+ 10.0.0.5 2 6 377 28 +50us[ +35us] +/- 1500us
^- 203.0.113.10 3 6 377 29 -90us[-110us] +/- 2500us
Understanding the symbols
The first column indicates the status of each source:
| Symbol | Meaning |
|---|---|
^* | Currently selected synchronization source |
^+ | Good candidate that could be selected |
^- | Valid source but not currently selected |
^? | Unreachable or insufficient data |
^x | Considered a false ticker (time differs too much) |
The -n option prevents DNS lookups and displays numeric IP addresses instead of hostnames.
Display synchronization status
chronyc tracking
Example:
Reference ID : C0A80101
Stratum : 3
System time : 0.000015 seconds slow
Last offset : -0.000021 seconds
RMS offset : 0.000018 seconds
Frequency : -2.456 ppm
Leap status : Normal
Important fields:
- Reference ID – Current synchronization source.
- Stratum – Distance from the primary reference clock (lower is generally better).
- System time – Difference between the system clock and Chrony’s estimate.
- Last offset – Most recent measured time difference.
- Frequency – Clock drift correction (parts per million).
- Leap status – Indicates whether synchronization is healthy.
View source statistics
chronyc sourcestats
Example:
Name/IP Address NP NR Span Frequency Freq Skew Offset
192.168.1.1 32 17 35m -0.012 0.005 -18us
This command displays historical statistics used by Chrony to evaluate the stability and accuracy of each source.
Check active clients (when acting as an NTP server)
chronyc clients
This command lists systems currently receiving time from the local Chrony server.
Force an immediate synchronization
chronyc makestep
Normally, Chrony adjusts the clock gradually. makestep immediately corrects the system clock, which is useful if the clock has drifted significantly after boot or after restoring a virtual machine snapshot.
View all server activity
chronyc activity
Example:
200 OK
3 sources online
0 sources offline
0 sources doing burst
This provides a quick overview of the status of all configured time sources.
Understanding Stratum
A stratum indicates how many synchronization “hops” a time source is from a primary reference clock.
| Stratum | Description |
| 0 | Reference clock (GPS, atomic clock) |
| 1 | Directly connected to a Stratum 0 source |
| 2 | Synchronizes with a Stratum 1 server |
| 3+ | Synchronizes from another NTP server |
Lower stratum does not always mean better accuracy; network quality and server stability are also important.
Typical Troubleshooting Workflow
When investigating synchronization issues:
- Verify that the daemon is running:
systemctl status chronyd - Check the synchronization source:
chronyc -n sources - Verify synchronization quality:
chronyc tracking - Review source statistics:
chronyc sourcestats - Confirm connectivity to the configured NTP servers if no sources are reachable.
Summary
Chrony continuously measures network delays, selects the most reliable time source, and keeps the Linux system clock accurate by gradually correcting clock drift. The chronyc utility provides several useful commands to monitor synchronization:
| Command | Purpose |
chronyc -n sources | Display configured time sources and their status |
chronyc tracking | Show overall synchronization status |
chronyc sourcestats | Display historical statistics for each source |
chronyc activity | Summarize source activity |
chronyc clients | List connected NTP clients (server mode) |
chronyc makestep | Immediately correct the system clock |
These commands provide the information needed to verify that Chrony is operating correctly and to troubleshoot most time synchronization issues.