Dear All,
I am in the process of configuring a local GPS 1PPS signal to work with NTP. This IS a software question, but a summary of my hardware endeavors is: I have setup the hardware successfully, as far as I know, mostly following the LinuxPPS wiki
[1]. The LinuxPPS software comes with a "ppstest" utility that I have used to verify my computer's recognition of the 1PPS signal coming in via a serial port. So now it's on to the software configuration. The details of getting all that to work can be found in another post of mine
[2].
As the 1PPS signal alone cannot tell the absolute time, it must be used in conjunction with another NTP reference clock/server. This is not a problem. The computer I am working with is already configured and running with an NTP server. So, effectively, all I want to do is add my local 1PPS signal into the mix. The
LinuxPPS NTPd support page for setting up such a system was a helpful starting point, but a bit minimal. I found
this post, which doesn't do exactly what I'm trying but close enough, quite informative too.
My problem is the 1PPS signal, though it shows up in ntpq, has the maximum jitter and is, effectively, not being processed (info below). So, in hopes that someone can point out the obvious to me, I'll post all the info I can think of being useful.
Some points to note: I'm using ntpd 4.2.0a. As far as I know this was installed/configured before I setup the LinuxPPS kernel and what not, so I'm afraid some configuration options for PPS support may be missing. However, I downloaded the latest code for NTP and compiled it with the suggestion options (in ref above). When I run that version of ntpd the PPS source doesn't even show up...
Also, as the NTP documentation
here suggests, in going over the status mesage of ntptime "status 0x1 (PLL)", I should see some acknowledgment of PPS, which I clearly don't. As obvious as it is that I've got -some- things wrong, I still don't know exactly where to go...
Anyway, we'll start from here:
ls -l /dev/pps*
Code:
# ls -l /dev/pps*
crw------- 1 root root 253, 0 Jul 15 11:28 /dev/pps
crw------- 1 root root 253, 0 Jul 15 16:04 /dev/pps0
/etc/ntp.conf
Code:
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0 flag3 1 flag2 0
server ntp01.so-and-so.com prefer
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
logconfig = +syncall +clockall +sysall +peerall
logfile /var/log/ntpd.log
statsdir /var/lib/ntp/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
ntpq -c rv -p (PPS source apparently detected, but dead...?)
Code:
# ntpq -c rv -p
assID=0 status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
version="ntpd 4.2.0a@1.1190-r Thu May 21 20:40:24 CDT 2009 (1)"?,
processor="i686",
system="Linux/2.6.28-rc6-20450-gace6faa-dirty", leap=00,
stratum=3, precision=-20, rootdelay=18.916, rootdispersion=29.375,
peer=19805, refid=192.153.107.22,
reftime=ce095bf3.cfd9dba9 Thu, Jul 16 2009 16:57:39.811, poll=6,
clock=0xce095c04.5631c64b, state=4, offset=-1.400, frequency=5.170,
noise=0.700, jitter=0.523, stability=1.210
remote refid st t when poll reach delay offset jitter
==============================================================================
PPS(0) .PPS. 16 l - 16 0 0.000 0.000 4000.00
*ntp01.so-and-so.com XXX.XX.XX.XXX 2 u 17 64 377 11.271 -1.400 0.523
ntptime
Code:
# ntptime
ntp_gettime() returns code 0 (OK)
time ce095c76.26073000 Thu, Jul 16 2009 16:59:50.148, (.148547),
maximum error 42497 us, estimated error 606 us
ntp_adjtime() returns code 0 (OK)
modes 0x0 (),
offset -1354.000 us, frequency 5.160 ppm, interval 1 s,
maximum error 42497 us, estimated error 606 us,
status 0x1 (PLL),
time constant 6, precision 1.000 us, tolerance 500 ppm,
ntpdc>sysinfo
Code:
ntpdc> sysinfo
system peer: ntp01.so-and-so.com
system peer mode: client
leap indicator: 00
stratum: 3
precision: -20
root distance: 0.01868 s
root dispersion: 0.03159 s
reference ID: [XXX.XXX.XXX.XXX]
reference time: ce095c72.cf8c5436 Thu, Jul 16 2009 16:59:46.810
system flags: auth monitor ntp kernel stats
jitter: 0.000549 s
stability: 1.099 ppm
broadcastdelay: 0.003998 s
authdelay: 0.000000 s
Cheers and many thanks in advance to any comments!
-Kevin