[ntp:questions] Linux, Garmin GPX-18X LVM & PPS
unruh
unruh at invalid.ca
Tue Dec 6 19:31:25 UTC 2011
On 2011-12-05, 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.
>
> 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
GET RID OF LOCAL. Sorry to shout but so many distributions have totally
incompetent instructions. LOCAL is the clock itself. It it is totally
and utterly useless for keeping time. Setting a clock with itself as the
reference will always say that the clock is exactly right, and will
always be totally wrong.
You do not have PPS
>
> So, it looks like its synchronising to the NMEA data coming from the GPS receiver without any problems, but is the PPS working?
> I'm fairly sure PPS is working, because ppstest shows:
>
> trying PPS source "/dev/gpspps0"
> found PPS source "/dev/gpspps0"
> ok, found 1 source(s), now start fetching data...
> source 0 - assert 1323090421.923486039, sequence: 8369 - clear 1323083494.562494878, sequence: 133
Notice your system is out by 76 ms.
> source 0 - assert 1323090422.923554857, sequence: 8370 - clear 1323083494.562494878, sequence: 133
> source 0 - assert 1323090423.923625515, sequence: 8371 - clear 1323083494.562494878, sequence: 133
> source 0 - assert 1323090424.923692379, sequence: 8372 - clear 1323083494.562494878, sequence: 133
> source 0 - assert 1323090425.923762947, sequence: 8373 - clear 1323083494.562494878, sequence: 133
>
> 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
Why do you have that line there? Please get rid of it. It is useless.
>
> #
> # NTP server (list one or more) to synchronize with:
> #server pool.ntp.org iburst
No harm in leaving the pool server in as a backup.
>
> # 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
You have told it to use the nmea source.
Not the PPS.
Either use gpsd and set it up to use the shm refclock, or use the Atom
PPS refclock as well.
>
> #
> # 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
>
>
> 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?
>
> 2) Should I put the "ldattach 18 /dev/ttyS0" command in rc.local - currently I'm running it manually after each boot.
>
> Thanks!
>
> Paul.--
> This message (and any attachments) is for the recipient only. NERC
> is subject to the Freedom of Information Act 2000 and the contents
> of this email and any reply you make may be disclosed by NERC unless
> it is exempt from release under the Act. Any material supplied to
> NERC may be stored in an electronic records management system.
And another of those stupid boilerplates which in fact destroy any
usefulness then have by use in totally inappropriate situations. Any
court would throw it out since it is obvious that the sender does not
really believe it.
More information about the questions
mailing list