LinuxCommandLibrary

chronyc

Monitor and control NTP client (chronyd)

TLDR

Start chronyc in interactive mode

$ chronyc
copy

Display tracking stats for the Chrony daemon
$ chronyc tracking
copy

Print the time sources that Chrony is currently using
$ chronyc sources
copy

Display stats for sources currently used by chrony daemon as a time source
$ chronyc sourcestats
copy

Step the system clock immediately, bypassing any slewing
$ chronyc makestep
copy

Display verbose information about each NTP source
$ chronyc ntpdata
copy

SYNOPSIS

chronyc [OPTION]... [host][:port] [COMMAND]...

PARAMETERS

-h, --help
    Print usage summary and exit

-v, --version
    Print version number and exit

-m, --interactive
    Force interactive mode

-a, --allow[=subnet]
    Allow updates to chronyd from specified subnet

-R, --command=command
    Execute specified command and exit

-r, --read-only
    Disallow commands that modify chronyd

-s, --nofork
    Do not fork when executing command

-t, --timers[=0|1]
    Enable/disable line timestamps in output

-d, --debug[=level]
    Enable debug messages (implies -s)

DESCRIPTION

chronyc is a versatile command-line interface for managing and monitoring the chronyd daemon, the core component of the Chrony NTP implementation on Linux and Unix-like systems. It enables administrators to view synchronization status, inspect NTP sources, adjust clock parameters, trigger updates, and perform diagnostics.

Key capabilities include displaying tracking data (tracking command), listing sources with statistics (sources, sourcestats), checking activity levels (activity), and making manual corrections like stepping the clock (makestep). It supports interactive mode for ongoing sessions or one-shot commands for scripting.

Designed for environments with variable network conditions, chronyc communicates via Unix socket or TCP (default localhost:323). Read-only mode prevents accidental changes, and debug options aid troubleshooting. Essential for precise timekeeping in servers, VMs, and embedded systems, it outperforms traditional NTP daemons in convergence speed and accuracy.

CAVEATS

Requires running chronyd daemon. Default connection is localhost:323 Unix socket or TCP. Some commands need elevated privileges.

COMMON COMMANDS

tracking: System clock tracking info
sources [-v]: List NTP sources
sourcestats: Source statistics
activity: Source activity counts
makestep: Step clock on update

INTERACTIVE USE

Run chronyc or chronyc -m for shell-like prompt. Type help for command list; exit or quit to leave.

HISTORY

Developed by Richard P. Curnow in 1997 as an alternative to ntpd. Maintained by Miroslav Lichvar since 2012. Integrated into major distros like RHEL, Debian; version 4.x added NTS support.

SEE ALSO

chronyd(8), ntp(8), ntpd(8), hwclock(8)

Copied to clipboard