[ntp:questions] [External] : Best method to measure NTP performance/drift. Loopstats or Peerstats
brian.utterback at oracle.com
Fri Jan 29 16:03:38 UTC 2021
> which is the difference between loopstats and peerstats for evaluating the
> drift respect a given timing source?
The peerstats file is written each time a new packet is received. Be careful, it represents the what NTP has calculated the information to be using the data from the eight most recent samples, not necessarily the latest one. If you want the actual data from each packet you need to use the "rawstats" file, which records the actual timestamps from each packet.
The loopstats file is written every time the kernel clock loop is updated, which generally is when a packet is received, but not always. It represents the data that NTP has calculated using the current set of data it has at that moment after updating all the data with the new packet.
> In my configuration, the NTP server is configured with just one additional
> source (GPS) always available.
> Should this stats file report the same data?
I am not exactly sure what you mean by "the same data".
> How can I increase the frequency of the log lines in the stats? Is there a way
> to have one line per second or should I "interrogate" the ntp daemon with
> ntpq, ntpdc commands?
If there hasn't been a triggering event like a new packet arriving, then the data hasn't changed so there is not much point in writing more data log lines. You could certainly use ntpq (ntpdc is deprecated) but the data would be the same each time until something changed.
> Thank you so much for the support.
More information about the questions