[ntp:questions] Re: drift/offset

Folkert van Heusden folkert at vanheusden.com
Thu Feb 3 16:49:05 UTC 2005


> The graph at http://keetweej.vanheusden.com/ntp_graph.png
> appears to show points taken at intervals of  much less than your poll 
> interval of 64 seconds!

No, every 5 minuts a sample is taken. Latest sample on the right.

> How are you computing the offsets?   An offset 
> is presumably  t2 - t1;  what is the source of t2 and t1 for each point 
> on the graph?

echo `date +"%s"` `/usr/sbin/ntpdc -c loopinfo localhost | /bin/grep frequency | /bin/awk '{ print $2; }'` `/usr/sbin/ntpq -c pe | /bin/grep -e "^*" | /usr/bin/awk '{ print $9; }'` >> /var/log/ntp.stats.log

So it is the frequency-field of ntpdc -c loopinfo for the drift, and
for the offset I take the offset-field of the line with * at the first
position of ntpq -c pe:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*GENERIC(0)      .DCFa.           0 l   38   64  377    0.000    0.349   3.695
^                                                                ^^^^^


Folkert van Heusden

Op zoek naar een IT of Finance baan? Mail me voor de mogelijkheden!
+------------------------------------------------------------------+
|UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)|
|a try, it brings monitoring logfiles to a different level! See    |
|http://vanheusden.com/multitail/features.html for a feature list. |
+------------------------------------------= www.unixsoftware.nl =-+
Phone: +31-6-41278122, PGP-key: 1F28D8AE



More information about the questions mailing list