The chronyc command is a command-line utility for managing and monitoring the chrony daemon, which is a daemon that provides network time synchronization on Linux systems. The chrony daemon is used to keep the system clock synchronized with a network time server, which helps to ensure that the system clock is accurate.
To use the chronyc command, you will need to have the Chrony daemon running on your system. You can start the daemon by running the systemctl start chronyd command.
To display the status of the chrony daemon, use the tracking subcommand:
# chronyc tracking
This will display information about the current time, the offset from the reference time source, and the frequency of the local clock.
If you encounter the below error while running the command chronyc:
chronyc : command not found
you may try installing the below package as per your choice of distribution:
Distribution | Command |
---|---|
Debian | apt-get install chrony |
Ubuntu | apt-get install chrony |
Alpine | apk add chrony |
Arch Linux | pacman -S chrony |
Kali Linux | apt-get install chrony |
CentOS | yum install chrony |
Fedora | dnf install chrony |
Raspbian | apt-get install chrony |
chronyc Command Examples
1.Start chronyc in interactive mode:
# chronyc
2.Display tracking stats for the Chrony daemon:
# chronyc tracking
3.Print the time sources that Chrony is currently using:
# chronyc sources
4.Display stats for sources currently used by chrony daemon as a time source:
# chronyc sourcestats
5.Step the system clock immediately, bypassing any slewing:
# chronyc makestep
6.Display verbose information about each NTP source:
# chronyc ntpdata