gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH] HOWTO: calculate the average GPS offset


From: Gary E. Miller
Subject: Re: [gpsd-dev] [PATCH] HOWTO: calculate the average GPS offset
Date: Mon, 21 Oct 2013 14:38:30 -0700

Yo Beat!

Looks cool.  But I would only do this after an ntpd server has been running
for days and is stable.  Mayb just say to repeat this procedure until
stable?

On Mon, 21 Oct 2013 23:29:21 +0200
Beat Bolli <address@hidden> wrote:

> ---
>  www/gpsd-time-service-howto.txt | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/www/gpsd-time-service-howto.txt
> b/www/gpsd-time-service-howto.txt index 62aefda..c0592a3 100644
> --- a/www/gpsd-time-service-howto.txt
> +++ b/www/gpsd-time-service-howto.txt
> @@ -459,6 +459,36 @@ If the offset is positive, reduce the time1
> value and vice versa. A more detailed description of the output is
> available at <<NTPQ-OUTPUT>>.
>  
> +In order to determine the correct GPS offset, do the following:
> +
> +1. Add these lines to ntp.conf:
> +
> +-----------------------------------------------------------------------------
> +statsdir /var/log/ntpstats/
> +statistics peerstats
> +filegen peerstats file peerstats type day enable
> +-----------------------------------------------------------------------------
> +
> +This enables logging of the peer server statistics.
> +
> +2. Start ntpd and let it run for at least four hours.
> +
> +3. Calculate the average GPS offset:
> +
> +-----------------------------------------------------------------------------
> +awk '
> +     /127\.127\.28\.0/ { sum += $5 * 1000; cnt++; }
> +     END { print sum / cnt; }
> +' </var/log/ntpstats/peerstats
> +-----------------------------------------------------------------------------
> +
> +This prints the average offset.
> +
> +5. Adjust the "time1" value in ntp.conf by subtracting the average
> +   offset from step 4.
> +
> +6. Restart ntpd.
> +
>  == Providing public NTP service ==
>  
>  <<NTP-FAQ>> has good advice on things to be sure you have done - and




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]