This post explains why the /var/log/chrony folder empty though the chronyd service is configured and running.
# ls -l /var/log/chrony/
Chronyd status shows running:
# systemctl status chronyd ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2021-03-25 17:00:20 IST; 3min 30s ago Docs: man:chronyd(8) man:chrony.conf(5) Process: 12987 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS) Process: 12983 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS) Main PID: 12985 (chronyd) CGroup: /system.slice/chronyd.service └─12985 /usr/sbin/chronyd Mar 25 17:00:20 [hostname] systemd[1]: Starting NTP client/server... Mar 25 17:00:20 [hostname] chronyd[12985]: chronyd version 3.4 startin...) Mar 25 17:00:20 [hostname] chronyd[12985]: Frequency -12.453 +/- 0.047...t Mar 25 17:00:20 [hostname] systemd[1]: Started NTP client/server. Mar 25 17:00:24 [hostname] chronyd[12985]: Selected sourceHint: Some lines were ellipsized, use -l to show in full.
In the chrony.conf file logdir also enabled/configured:
# cat /etc/chrony.conf |grep log # Specify directory for log files. logdir /var/log/chrony # Select which information is logged. #log measurements statistics tracking
Enabling Chrony statistics logs
1. The Directory /var/log/chrony used to store statistics logs, by default the “log measurements” parameter is commented(disabled), to enable the statistics logs.
2. Edit the /etc/chrony.conf file and uncomment the line starts with “log measurements”. For example:
From:
# Select which information is logged. #log measurements statistics tracking
To:
# Select which information is logged. log measurements statistics tracking
3. Restart the chronyd service:
# systemctl restart chronyd
4. Now list the Directory and verify:
# ls -l /var/log/chrony/ total 12 -rw-r--r--. 1 chrony chrony 959 Mar 25 17:04 measurements.log -rw-r--r--. 1 chrony chrony 585 Mar 25 17:04 statistics.log -rw-r--r--. 1 chrony chrony 792 Mar 25 17:04 tracking.log