[ntp:questions] ntpd connect gpsd shared memory driver

Rob nomail at example.com
Tue Jun 18 07:30:12 UTC 2013

Richard Cagley <rcagley at gmail.com> wrote:
> Based on poor luck with ntpd/pps, I'm trying to have ntpd use the shared
> memory driver provided by gpsd. Do I need to give a special flag to
> configure for ntp to tell it to build in support for the shared memory
> driver?
> Using this for my ntp.conf
> ---
> server minpoll 4
> fudge refid NMEA
> ---
> I get nothing
> / # ntpq -p
>      remote           refid      st t when poll reach   delay   offset
>  jitter
> ==============================================================================
>  SHM(0)          .NMEA.           0 l    -   16    0    0.000    0.000
> 0.000
> but, gpsd is patiently waiting for something to happen...
> / # gpsd -b -N -D5 /dev/ttyO0
> gpsd:INFO: launching (Version 3.9)
> gpsd:IO: opening IPv4 socket
> gpsd:INFO: listening on port 2947
> gpsd:PROG: NTPD shmat(0,0,0) succeeded, segment 0
> gpsd:PROG: NTPD shmat(32769,0,0) succeeded, segment 1
> gpsd:PROG: NTPD shmat(65538,0,0) succeeded, segment 2
> gpsd:PROG: NTPD shmat(98307,0,0) succeeded, segment 3
> gpsd:INFO: NTPD ntpd_link_activate: 1
> gpsd:INFO: stashing device /dev/ttyO0 at slot 0
> gpsd:INFO: running with effective group ID 0
> gpsd:INFO: running with effective user ID 99
> gpsd:INFO: startup at 2000-01-01T00:05:57.000Z (946685157)
> Note, I can telnet to the local IP/port and if I issue a watch command the
> gpsd starts grabbing nmea data.

I think you need to read the documentation...  what you see is what
is to be expected.

When you want gpsd to sync the clock even when you are not using its
API, you need to pass the -n flag at startup.

Also, your ntp config is not complete when you want to use pps.
There are two SHM segments, one for NMEA and one for PPS.

More information about the questions mailing list