diff options
Diffstat (limited to 'contrib/ntpoffset')
-rwxr-xr-x | contrib/ntpoffset | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/ntpoffset b/contrib/ntpoffset new file mode 100755 index 00000000..ef97c7ce --- /dev/null +++ b/contrib/ntpoffset @@ -0,0 +1,10 @@ +#!/bin/sh +# +# Generate an estimate of your GPS's offset from a peerstats file +# For instructions on how to use this script, see the GPSD Time +# Service HOWTO in this distrubution. +# +awk ' + /127\.127\.28\.0/ { sum += $5 * 1000; cnt++; } + END { print sum / cnt; } +' </var/log/ntpstats/peerstats |