LinuxCommandLibrary

chrony

TLDR

Check synchronization status

$ chronyc tracking
copy
Show NTP sources
$ chronyc sources
copy
Show detailed source statistics
$ chronyc sourcestats
copy
Force immediate synchronization
$ sudo chronyc makestep
copy
Add a new NTP server
$ chronyc add server [ntp.example.com]
copy
Show all peers
$ chronyc clients
copy
Check if chrony is synchronized
$ chronyc waitsync
copy

SYNOPSIS

chronyc [options] [command]
chronyd [options]

DESCRIPTION

chrony is a versatile NTP (Network Time Protocol) implementation for synchronizing system clocks. It consists of chronyd (daemon) and chronyc (command-line interface).
chrony excels in challenging environments: intermittent network connections, virtual machines with unstable clocks, and systems that sleep or hibernate. It synchronizes faster than ntpd and maintains better accuracy in variable conditions.
Configuration is in /etc/chrony.conf (or /etc/chrony/chrony.conf), specifying NTP servers, access controls, and clock adjustments. The daemon can operate as both NTP client and server.

PARAMETERS (chronyc)

tracking

Display system clock synchronization status.
sources [-v]
Show NTP sources (verbose with -v).
sourcestats
Display source statistics.
makestep
Step clock immediately if offset is large.
add server address
Add an NTP server.
delete address
Remove an NTP source.
burst polls/good
Speed up initial synchronization.
activity
Show number of online/offline sources.
ntpdata address
Show detailed NTP data for a source.
waitsync [max-tries]
Wait until synchronized.

PARAMETERS (chronyd)

-d

Run in foreground (debug mode).
-f file
Specify configuration file.
-q
Set clock once and exit.
-Q
Like -q but don't set clock.

CAVEATS

The makestep command can cause time jumps that affect running applications. Firewall must allow UDP port 123 for NTP. chronyd must run as root or with CAPSYSTIME capability. Some applications may malfunction if time changes significantly.

HISTORY

chrony was originally written by Richard Curnow starting in 1997 to provide better accuracy for systems with intermittent network connectivity. Miroslav Lichvar took over maintenance and development in 2007. chrony has become the default NTP client in many Linux distributions including Fedora and RHEL, chosen over ntpd for its faster sync and better handling of modern computing environments.

SEE ALSO

ntpd(8), timedatectl(1), hwclock(8)

Copied to clipboard