Enable NTP statistics

Edit file /etc/ntp.conf

#Enable NTP statistics
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

Restart ntp service. If it shows the following message, the directory /var/log/ntpstats has wrong permissions

May 21 14:56:40 linux ntpd[11202]: can’t open /var/log/ntpstats/peerstats.20150521: Permission denied

ntpd is running under user ntp

root@linux:~ # ps -ef | grep ntp
ntp 31445 1 0 15:05 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ -g

Change the permission as needed

root@linux:~ # ls -ld /var/log/ntpstats
drwxr-xr-x 2 ntp ntp 4096 May 21 15:00 /var/log/ntpstats

%d bloggers like this: