blob: a8876805cc4fb839d2f8f41ae0f89b4c69f1bcf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/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.
#
# This file is Copyright (c) 2010-2018 by the GPSD project
# SPDX-License-Identifier: BSD-2-clause
awk '
/127\.127\.28\.0/ { sum += $5 * 1000; cnt++; }
END { print sum / cnt; }
' </var/log/ntpstats/peerstats
|