Devuan fork of gpsd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
402 B

  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 distrubution.
  6. #
  7. # This file is Copyright (c) 2010-2018 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