[ntp:questions] Linux, Garmin GPX-18X LVM & PPS
Miguel Gonçalves
mail at miguelgoncalves.com
Tue Dec 6 12:26:52 UTC 2011
Hi Paul!
On 5 December 2011 13:16, Duncan, Paul A. <pdu at noc.ac.uk> wrote:
> Hello,
>
> I am trying to set up an NTP server using the Garmin GPS-18 as the
> reference clock. I think I'm most of the way there, but I have a couple of
> questions.
>
I have a Garmin GPS18 running on a FreeBSD server. I believe I can help.
Firstly, here is the output from ntpq:
>
> remote refid st t when poll reach delay offset
> jitter
>
> ==============================================================================
> LOCAL(0) .LOCL. 10 l 2028 64 0 0.000 0.000
> 0.000
> *GPS_NMEA(0) .GPS. 0 l 43 64 377 0.000 -10.969
> 11.575
>
This is definitely not seeing the PPS signal. There are two ways to check
for that:
1. The offset should be around 10 us (see bellow) and you should see a 'o'
before the GPS_NMEA line like so:
tick# ntpq -p
remote refid st t when poll reach delay offset
jitter
==============================================================================
oGPS_NMEA(0) .GPS. 0 l 6 16 377 0.000 0.008
0.004
+tock.xyabcd.com .GPS. 1 u 1 16 377 0.158 -0.012
0.009
+time.xyabcd.com .PPS. 1 u 6 16 376 0.161 -0.003
0.005
2. Besides that you should also see the following:
tick# ntptime
ntp_gettime() returns code 0 (OK)
time d28887cd.736a6174 Tue, Dec 6 2011 12:23:41.450, (.450842129),
maximum error 1746 us, estimated error 1 us, TAI offset 0
ntp_adjtime() returns code 0 (OK)
modes 0x0 (),
offset 6.756 us, frequency -0.543 ppm, interval 256 s,
maximum error 1746 us, estimated error 1 us,
status 0x2107 (PLL,PPSFREQ,PPSTIME,PPSSIGNAL,NANO),
time constant 4, precision 0.001 us, tolerance 496 ppm,
pps frequency -0.543 ppm, stability 0.024 ppm, jitter 0.436 us,
intervals 667, jitter exceeded 1153, stability exceeded 0, errors 12.
Look for PPS like flags.
So, I'm guessing it must be a problem with my ntp.conf. The top part of
> this is shown below:
>
> server 127.127.1.0 # local clock
> fudge 127.127.1.0 stratum 10
>
> #
> # NTP server (list one or more) to synchronize with:
> #server pool.ntp.org iburst
>
> # LinuxPPS: Garmin GPS-18
> server 127.127.20.0 mode 0 prefer
> fudge 127.127.20.0 stratum 0 flag1 1 flag2 0 time2 0.600
>
> #
> # Drift file. Put this in a directory which the daemon can write to.
> # No symbolic links allowed, either, since the daemon updates the file
> # by creating a temporary in the same directory and then rename()'ing
> # it to the file.
> #
> driftfile /etc/ntp/drift
>
This is my ntp.conf file
tick# cat /etc/ntp.conf
server 127.127.20.0 prefer mode 2 minpoll 4 maxpoll 4
fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 flag4 1 time2 0.195
peer tock.xyabcd.com minpoll 4 maxpoll 4
peer time.xyabcd.com minpoll 4 maxpoll 4
tos mindist 0.250
statistics loopstats
statsdir /var/log/ntp/
filegen loopstats file loop type day enable
restrict 127.0.0.1
restrict 192.168.111.0 mask 255.255.255.0
restrict default nomodify notrap nopeer
> Just for info, the OS is Slackware 13.37, but I have removed the
> as-installed NTP package, and downloaded and built NTP 4.2.6.
>
> So, to summarise my questions:
>
> 1) Is ntpd getting the PPS information?
>
No. Look above.
>
> 2) Should I put the "ldattach 18 /dev/ttyS0" command in rc.local -
> currently I'm running it manually after each boot.
>
Can't help you with that. Sorry.
Cheers,
Miguel
More information about the questions
mailing list