ntpoffset 393 B

12345678910111213
  1. #!/bin/sh
  2. #
  3. # Generate an estimate of your GPS's offset from a peerstats file
  4. # For instructions on how to use this script, see the GPSD Time
  5. # Service HOWTO in this distribution.
  6. #
  7. # This file is Copyright 2010 by the GPSD project
  8. # SPDX-License-Identifier: BSD-2-clause
  9. awk '
  10. /127\.127\.28\.0/ { sum += $5 * 1000; cnt++; }
  11. END { print sum / cnt; }
  12. ' </var/log/ntpstats/peerstats