[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] A detail in your ntpoffset script
From: |
Beat Bolli |
Subject: |
Re: [gpsd-dev] A detail in your ntpoffset script |
Date: |
Wed, 23 Oct 2013 00:33:34 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 |
On 23.10.13 00:17, Eric S. Raymond wrote:
> awk '
> /127\.127\.28\.0/ { sum += $5 * 1000; cnt++; }
> END { print sum / cnt; }
> ' </var/log/ntpstats/peerstats
>
> Should that be .1 rather than .0?
>
> I'm thinking of this coment in ntpshm.c:
>
> * Segments 0 and 1: permissions 0600, i.e. other programs can only
> * read and write as root.
> *
> * Segments 2 and 3: permissions 0666, i.e. other programs can read
> * and write as any user. I.e.: if ntpd has been
> * configured to use these segments, any
> * unpriviliged user is allowed to provide data
> * for synchronisation.
> *
> * As gpsd can be started as both root and non-root, this behaviour is
> * mimicked by:
> *
> * Started as root: do as ntpd when attaching (creating) the segments.
> * (In contrast to ntpd, which only attaches (creates) configured
> * segments, gpsd creates all segments.)
> *
> * Started as non-root: only attach (create) segments 2 and 3 with
> * permissions 0666. As the permissions are for any user, the creator
> * does not matter.
> *
> * For each GPS module gpsd controls, it will use the attached ntpshm
> * segments in pairs (for coarse clock and pps source, respectively)
> * starting from the first found segments. I.e. started as root, one
> * GPS will deliver data on segments 0 and 1, and as non-root data
> * will be delivered on segments 2 and 3.
>
> This seems to imply that the PPS unit is .1 rather than .0.
>
This is correct, but I was assuming that the PPS doesn't have to be
fudged, because it is directly connected to the kernel PPS via an
interrupt. I have a fudge offset only on the GPS unit, and none on the
PPS. This seems to make sense to me, because only the NMEA stuff is
delayed by the RS232 transmission.
Beat
--
mail: echo '<address@hidden>' | tr -d '[A-S]'
pgp: 0x506A903A; 49D5 794A EA77 F907 764F D89E 304B 93CF 506A 903A
gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa
icbm: 47.0452 N, 7.2715 E
"It takes love over gold, and mind over matter" -- Dire Straits
signature.asc
Description: OpenPGP digital signature
Re: [gpsd-dev] A detail in your ntpoffset script, Gary E. Miller, 2013/10/22
Re: [gpsd-dev] A detail in your ntpoffset script, Eric S. Raymond, 2013/10/22