[ntp:questions] shm and reach
mjlee at mindless.com
Thu May 7 23:47:02 UTC 2009
I'm trying to use ntpd with gpsd on a linux system, but am unable to get ntpd to update my system clock.
I'm using the first SHM segment only (127.127.80.0) and do not have a PPS signal available. I know that gpsd is running, has a 3D fix and is writing into the SHM segment.
Running ntpq -p shows that the reach is never non-zero.
remote refid st t when poll reach delay offset jitter
SHM(0) .GPS. 0 l - 16 0 0.000 0.000 0.004
Interestingly, ntpq's associations command says "yes" for reach:
ind assID status conf reach auth condition last_event cnt
1 44334 8025 yes yes none reject clock expt 2
I assume that "condition == reject" is bad?
>From looking through the ntpd source code, it appears that the reach is only ever set to non-zero in the receive() function. This makes sense when using remote NTP servers, but I don't understand how this works when there is no remote server, just the (local) SHM segment. As far as I can tell, no packets are ever received, the reach never gets "seeded". refclock_transmit() does get called regularly, so peer->reach <<= 1 does happen.... but shifting zero still gives you zero.
shm_poll() also gets called regularly and the appropriate timestamps are read from the SHM segment, but they never get used (due, I believe, to the reason outlined above).
My ntp.conf file is:
restrict default ignore
server 127.127.28.0 prefer minpoll 4 maxpoll 4
fudge 127.127.28.0 time1 0.420 refid GPS
I'm running ntpd version 4.2.2p2
(I've also tried with ntpd 4.2.4.p6 and got the same outcome).
Thanks for any help...
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com
More information about the questions