gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] NTP for more than two PPS-capable devices


From: Gary E. Miller
Subject: Re: [gpsd-users] NTP for more than two PPS-capable devices
Date: Wed, 14 Jan 2015 13:45:06 -0800

Yo Eric!

On Wed, 14 Jan 2015 16:32:05 -0500
"Eric S. Raymond" <address@hidden> wrote:

> Gary E. Miller <address@hidden>:
> > > If it is not real, how do you know how many segments NTP will
> > > support.  Is there a way to ask it?
> > 
> > Here is some doc:
> > 
> > "SYSV IPC creates a shared memory segment with a key value of
> > 0x4E545030
> > + u, where u is again the clock unit. (This value could be
> > hex-decoded as 'NTP0', 'NTP1',..., with funny characters for units
> > > 9.) "
> > 
> > ntp_refclock.c line 193 does truncate unit to a u_char, so 256
> > would be the upper limit.  I see some overflow issues, in
> > refclock_shm.c line 126, so 207 is probably the max useable.
> > 
> > If you wanted to stick to ASCII (no good reason to) you would have
> > about 80.
> 
> OK, that's interesting, but it doesn't completely answer my
> question.  Say I'm a running instance of GPSD.  Can I just create
> segments ad-hoc up to a limit up to (say) 128 and expect ntpd to pick
> up on all of them automatically?

No.  No SHMs are never picked up by ntpd automatically.

For ntp to pick up an SHM it must be specified explicitly in ntp.conf, 
before tnpd is started.

An example for unit 0 (NTP0) add this to ntp.conf:

server 127.127.28.0 

For unit 1 (NTP1) add this:

server 127.127.28.1

The format is 127.127.t.u which overloads the IPv4 space.  't' is the
clock type.  The SHM clock type is 28.  'u' is the unit number (0..207).

gpsd has used 0 and 1 for NMEA and PPS time respectively when running as 
root, and 2 and 3 when not root.  ntpd 4.2.8 will break that.

> If not, how can I find out what its
> upper limit is from a running instance of ntpd?

Thus the automatic limit is zero.

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



reply via email to

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