chrony
chrony is an implementation of Network Time Protocol
install
apt install chrony
sample config
specify ntp server at server or ntp server pool for pool
$ grep -E -v "^#|^$" /etc/chrony/chrony.conf
server 192.168.xxx.xxx iburst minpoll 6 maxpoll 10
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony
maxupdateskew 100.0
rtcsync
makestep 1 3
reload configuration
systemctl status chronyd
journalctl -u chrony -f
systemctl force-reload chrony
show system track performance
chronyc tracking
show current time sources
chronyc sources
show information about drift rate and offset estimation process
chronyc sourcestats
show the last valid measurement and other information
chronyc ntpdata
server
For server settings, at least add a allow line.
cmdallow and bindcmdaddress lines are optional which is for monitoring access
$ grep -E -v "^#|^$" /etc/chrony/chrony.conf
server 192.168.xxx.xxx iburst minpoll 6 maxpoll 10
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony
maxupdateskew 100.0
rtcsync
makestep 1 3
allow 192.168.xxx.0/24
cmdallow 192.168.xxx.0/24
bindcmdaddress 127.0.0.1
bindcmdaddress 192.168.xxx.xxx
show list of clients
chronyc clients
specify a remote host to which chronyd is to be connected (using udp/323) default is localhost
cronyc -h 192.168.xxx.xxx