====== Chrony ======
\\
===== Installieren =====
apt install chrony
yum -y install chrony
\\
===== Check & Autostart =====
systemctl status chronyd
systemctl enable chronyd
\\
====== NTP Status ======
**Kontrolle ob NTP im Sync ist und mit welchem Server**
\\
root@server:~# chronyc tracking
Reference ID : 91.206.8.34 (svn.mediainvent.at)
Stratum : 3
Ref time (UTC) : Wed Feb 19 12:53:08 2020
System time : 0.000287476 seconds fast of NTP time
Last offset : +0.000015262 seconds
RMS offset : 0.000174217 seconds
Frequency : 21.064 ppm slow
Residual freq : -0.000 ppm
Skew : 0.008 ppm
Root delay : 0.029967 seconds
Root dispersion : 0.017685 seconds
Update interval : 1044.1 seconds
Leap status : Normal
\\
===== NTP Quellen =====
**Anzeigen aller NTP Source die konfiguriert sind**
\\
root@server:~# chronyc sources
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^+ ns5.nosuchhost.net 2 10 377 575 +2977us[+2992us] +/- 44ms
^* svn.mediainvent.at 2 10 377 518 -8927us[-8912us] +/- 55ms
^+ 37.252.187.111 3 9 377 332 +5534us[+5534us] +/- 56ms
\\
===== Konfiguration =====
/etc/chrony.conf oder /etc/chrony/chrony.conf
server 0.at.pool.ntp.org iburst
server 1.at.pool.ntp.org iburst
server 2.at.pool.ntp.org iburst
server 3.at.pool.ntp.org iburst
stratumweight 0
driftfile /var/lib/chrony/drift
makestep 10 3
logdir /var/log/chrony
\\
**Erklärung:**
* server – this directive used to describe a NTP server to sync from.
* stratumweight – how much distance should be added per stratum to the sync source. The default value is 0.0001.
* driftfile – location and name of the file containing drift data.
* Makestep – this directive causes chrony to gradually correct any time offset by speeding or slowing down the clock as required.
* logdir – path to chrony’s log file.
\\
===== NTP Sync force =====
**NTP Zeit sofort und hart auf den aktuellen Stand bringen**
chronyc makestep