Understanding Chrony: Synchronizing Time on Linux

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 the chronyd service.

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:

  1. Measures the network delay.
  2. Calculates the time offset between the local clock and the remote server.
  3. Filters multiple measurements to remove inaccurate samples.
  4. 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:

SymbolMeaning
^*Currently selected synchronization source
^+Good candidate that could be selected
^-Valid source but not currently selected
^?Unreachable or insufficient data
^xConsidered 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.

StratumDescription
0Reference clock (GPS, atomic clock)
1Directly connected to a Stratum 0 source
2Synchronizes 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:

  1. Verify that the daemon is running:systemctl status chronyd
  2. Check the synchronization source:chronyc -n sources
  3. Verify synchronization quality:chronyc tracking
  4. Review source statistics:chronyc sourcestats
  5. 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:

CommandPurpose
chronyc -n sourcesDisplay configured time sources and their status
chronyc trackingShow overall synchronization status
chronyc sourcestatsDisplay historical statistics for each source
chronyc activitySummarize source activity
chronyc clientsList connected NTP clients (server mode)
chronyc makestepImmediately correct the system clock

These commands provide the information needed to verify that Chrony is operating correctly and to troubleshoot most time synchronization issues.