Linux command
chronyc 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Check synchronization status
chronyc tracking
List time sources
chronyc sources
Verbose source list
chronyc sources -v
Source statistics
chronyc sourcestats
Force time sync
chronyc makestep
Add NTP server
chronyc add server [pool.ntp.org]
Show number of online/offline sources
chronyc activity
Connect to a remote chrony daemon
chronyc -h [remote-host]
Interactive mode
chronyc
说明
chronyc is the command-line interface for chronyd, the NTP daemon. Used to monitor synchronization status, manage time sources, and configure the daemon. Changes are not persistent across restarts.
参数
- -n
- Don't resolve hostnames
- -N
- Print original hostnames as specified in config, not reverse DNS
- -c
- CSV output format
- -m
- Allow multiple commands on one line
- -4
- Resolve hostnames to IPv4 addresses only
- -6
- Resolve hostnames to IPv6 addresses only
- -h _host_
- Connect to remote chronyd
- -p _port_
- Specify port for remote chronyd connection
FAQ
What is the chronyc command used for?
chronyc is the command-line interface for chronyd, the NTP daemon. Used to monitor synchronization status, manage time sources, and configure the daemon. Changes are not persistent across restarts.
How do I run a basic chronyc example?
Run `chronyc tracking` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n do in chronyc?
Don't resolve hostnames