The Essential Guide to Using Chrony for NTP on Linux

When I first started working with Linux servers, managing time synchronization seemed like a daunting task.

My team had always relied on the traditional ntpd service for Network Time Protocol (NTP), and it worked well enough.

But when Red Hat Enterprise Linux (RHEL) 8 came around and the focus shifted to chronyd from the Chrony suite, I knew it was time to dive into something new.

My initial encounter with Chrony was both intriguing and challenging. The promise of improved accuracy, especially in virtualized environments and with intermittent network connections, caught my attention.

I decided to take the plunge and migrate our timekeeping services from ntpd to Chrony.

This article explores how to configure and manage time synchronization using Chrony, highlighting its benefits and how to migrate from older NTP methods.

Understanding the Chrony Suite

Chrony is a modern NTP implementation designed for accuracy and flexibility, especially in challenging conditions such as intermittent connections or fluctuating temperatures. It consists of two main components:

  • chronyd: The daemon that runs in user space to synchronize system time.
  • chronyc: A command-line utility used to monitor and control chronyd.

Chrony can:

  • Sync the system clock with NTP servers.
  • Use reference clocks, such as GPS receivers.
  • Accept manual time inputs.
  • Act as an NTPv4 server or peer to provide time services to other network computers.

Chrony provides excellent accuracy, with typical synchronization within milliseconds over the Internet and microseconds on a local network. For even finer precision, hardware timestamping or reference clocks can achieve sub-microsecond accuracy.

See also: Mastering the Linux Command Line — Your Complete Free Training Guide

Configuring Chrony with chronyc

To manage chronyd, you use the chronyc command-line utility. Here’s how to use it:

  • Interactive Mode: Start chronyc as root:
    # chronyc

    This opens an interactive prompt where you can enter commands. For a list of available commands, type help.

  • Non-Interactive Mode: Execute commands directly:
    chronyc command

    Remember that changes made via chronyc are not permanent; to make persistent changes, you should edit the /etc/chrony.conf file.

Migrating from ntpd to chronyd

With the introduction of RHEL 8, ntpd is no longer supported, and chronyd is the default.

Migrating from ntpd to chronyd involves mapping configurations from ntpd to chronyd. Here’s a quick reference:

ntpd Namechronyd Name
/etc/ntp.conf/etc/chrony.conf
/etc/ntp/keys/etc/chrony.keys
ntpdchronyd
ntpqchronyc
ntpd.servicechronyd.service
ntpdatechronyd -q

The ntpdate and sntp utilities, previously part of the NTP distribution, can be replaced by chronyd.

You can use the -q or -t options to specify configurations directly on the command line, bypassing the need to read from /etc/chrony.conf.

For instance, instead of using ntpdate ntp.example.com, you can start chronyd with:

# chronyd -q 'server ntp.example.com iburst'
2018-05-18T12:37:43Z chronyd version 3.3 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG)
2018-05-18T12:37:43Z Initial frequency -2.630 ppm
2018-05-18T12:37:48Z System clock wrong by 0.003159 seconds (step)
2018-05-18T12:37:48Z chronyd exiting

Installing and Managing Chrony

Chrony is usually pre-installed on RHEL systems. If it’s not, you can install it with:

# yum install chrony

To manage the chronyd service, use these systemd commands:

  • Start Chronyd:
    # systemctl start chronyd

  • Enable Chronyd to Start on Boot:
    # systemctl enable chronyd

  • Stop Chronyd:
    # systemctl stop chronyd

  • Disable Chronyd from Starting on Boot:
    # systemctl disable chronyd

Verifying Chrony Synchronization

To check if chronyd is properly synchronized, use the following chronyc commands:

  • Tracking:
    $ chronyc tracking
    Reference ID : CB00710F (ntp-server.example.net)
    Stratum : 3
    Ref time (UTC) : Fri Jan 27 09:49:17 2017
    System time : 0.000006523 seconds slow of NTP time
    Last offset : -0.000006747 seconds
    RMS offset : 0.000035822 seconds
    Frequency : 3.225 ppm slow
    Residual freq : 0.000 ppm
    Skew : 0.129 ppm
    Root delay : 0.013639022 seconds
    Root dispersion : 0.001100737 seconds
    Update interval : 64.2 seconds
    Leap status : Normal

  • Sources:
    $ chronyc sources
    210 Number of sources = 3
    MS Name/IP address Stratum Poll Reach LastRx Last sample
    ===============================================================================
    #* GPS0 0 4 377 11 -479ns[ -621ns] /- 134ns
    ^? a.b.c 2 6 377 23 -923us[ -924us] +/- 43ms
    ^ d.e.f 1 6 377 21 -2629us[-2619us] +/- 86ms

  • Source Statistics:
    $ chronyc sourcestats
    210 Number of sources = 1
    Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
    ===============================================================================
    abc.def.ghi 11 5 46m -0.001 0.045 1us 25us

 ✅ 1️⃣ Check which NTP server is actually in use

To see which server Chrony is currently syncing to, use:

chronyc tracking

This shows the synchronization status, including:

  • Reference ID: the current upstream server being used
  • Stratum, Last offset, System time, etc.

Example output:

Reference ID    : 10.240.240.20 (10.240.240.20)
Stratum         : 3
Ref time (UTC)  : Tue Nov 04 07:13:42 2025
System time     : 0.000000123 seconds slow of NTP time
Last offset     : +0.000002345 seconds

🔹 The Reference ID (like 10.240.240.20) shows the server currently in use — that’s the one actually “working.”


2️⃣ See the status of all configured servers

chronyc sources -v

This lists all your configured NTP sources and their statuses.

Example output:

210 Number of sources = 4
  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
  / .- Source state '*' = current source, '+' = combined, '-' = not combined,
 | /   '?' = unreachable, 'x' = falseticker, '~' = variable.
 ^* 10.240.240.20      3   8   377    23ms  +123us  [ +45us]  +/-  12ms
 ^+ 10.240.241.20      3   8   377    25ms  +234us  [ +67us]  +/-  13ms
 ^- 10.240.240.2       3   8   377    22ms  +345us  [ +89us]  +/-  11ms
 ^- 10.240.241.2       3   8   377    26ms  +456us  [ +90us]  +/-  14ms

Interpretation:

  • ^* — the current active source (the one actually used)
  • ^+ — good alternative source (standby)
  • ^- — evaluated but not selected
  • ^? — unreachable
  • ^x — marked as a false ticker (bad time source)

3️⃣ Summary Table

CommandPurposeWhat to Look For
chronyc trackingShows current synchronization statusCheck the Reference ID
chronyc sources -vLists all time sourcesLook for the ^* symbol
chronyc sourcestats -vShows detailed stats (delay, jitter, etc.)Helps assess stability

In conclusion, embracing Chrony for NTP configuration has been a rewarding experience. It’s a testament to how adopting newer technologies can lead to significant improvements in system performance and reliability.

If you’re still using ntp, I highly recommend giving Chrony a try—your timekeeping will thank you.

David Cao
David Cao

David is a Cloud & DevOps Enthusiast. He has years of experience as a Linux engineer. He had working experience in AMD, EMC. He likes Linux, Python, bash, and more. He is a technical blogger and a Software Engineer. He enjoys sharing his learning and contributing to open-source.

Articles: 546

Leave a Reply

Your email address will not be published. Required fields are marked *