[LinuxPPS] how to tell if LinuxPPS and GPS are updating ntp (and system time)

Allan Ievers aimail-linuxpps at rearden.com
Fri Nov 20 22:38:16 CET 2009


Hello,

I'm having trouble telling if I have LinuxPPS set up properly.

We're using this GPS:

Fury GPSDO - Desktop unit
http://www.jackson-labs.com/products_fury.html

Our goal is to use it along with linuxpps.

We pass the following signals from the Fury GPSD0 to the RS232 serial port:

- "NMEA time stamp" (to pin 3)
- "PPS" (to pin 1, DCD)

I am having trouble understanding if ntp is really using the pps signal and
the gps information.

We use the NTP driver 20 (mode 2, to read the "GPGGA" output) to get
both time stamp and PPS. My ntp.conf section is posted a little farther on
in this mail.


Here's output from the ntpd (ntpd -g -d):

local_clock: time 0 offset 0.000000 freq 0.000 state 0
addto_syslog: kernel time sync status 2040
addto_syslog: frequency initialized 60.643 PPM from /var/lib/ntp/drift
peer_crypto_clear: at 0 next 0 assoc ID 26750
peer_clear: at 0 next 1 assoc ID 26750 refid INIT
newpeer: 172.16.24.123->169.229.70.64 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
peer_crypto_clear: at 0 next 0 assoc ID 26751
peer_clear: at 0 next 2 assoc ID 26751 refid INIT
newpeer: 172.16.24.123->74.207.245.227 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
peer_crypto_clear: at 0 next 0 assoc ID 26752
peer_clear: at 0 next 3 assoc ID 26752 refid INIT
newpeer: 172.16.24.123->138.236.128.113 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
peer_crypto_clear: at 0 next 0 assoc ID 26753
peer_clear: at 0 next 4 assoc ID 26753 refid INIT
refclock_setup fd 5 modem status: 0x4006
refclock_ioctl: fd 5 flags 0x1
addto_syslog: refclock_nmea: found GPS source "/dev/gps0"
addto_syslog: refclock_nmea: try "/dev/gpspps0" for PPS
addto_syslog: refclock_nmea: found PPS source "/dev/gpspps0"
refclock_ppsapi: capability 0x1151 version 1 mode 0x1101 kern 0
newpeer: 127.0.0.1->127.127.20.0 mode 3 vers 4 poll 4 10 flags 0x10a1 0x1 ttl 0 key 00000000
addto_syslog: refclock_nmea: time_pps_kcbind failed: Operation not supported
local_clock: time 0 offset 0.000000 freq 60.643 state 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)
nmea: gpsread 69 $GPGGA,120003.00,3018.1462,N,09742.7764,W,0,00,0.0,172.2,M,0.0,M,,*48
nmea: gpsread 69 $GPGGA,120004.00,3018.1462,N,09742.7764,W,0,00,0.0,172.2,M,0.0,M,,*4f
nmea: gpsread 69 $GPGGA,120006.00,3018.1462,N,09742.7764,W,0,00,0.0,172.2,M,0.0,M,,*4d
nmea: gpsread 69 $GPGGA,120007.00,3018.1462,N,09742.7764,W,0,00,0.0,172.2,M,0.0,M,,*4c
transmit: at 1 172.16.24.123->169.229.70.64 mode 3
auth_agekeys: at 1 keys 1 expired 0
timer: interface update

Here's the output of our ntpq -p:

$ ntpq -c rv -p
assID=0 status=0654 leap_none, sync_ntp, 5 events, event_peer/strat_chg,
version="ntpd 4.2.4p7 at 1.1607 Thu Nov 19 01:25:15 UTC 2009 (3)",
processor="x86_64", system="Linux/2.6.31.5-pps2", leap=00, stratum=3,
precision=-23, rootdelay=69.204, rootdispersion=74.872, peer=64378,
refid=128.10.252.9,
reftime=ceb15f91.1771753a  Fri, Nov 20 2009 10:33:53.091, poll=7,
clock=ceb16172.1c57a92f  Fri, Nov 20 2009 10:41:54.110, state=4,
offset=-21.152, frequency=64.109, jitter=9.949, noise=26.233,
stability=13.279
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+triangle.kansas 128.252.19.1     2 u   66  128  267   64.316   -9.436   8.229
*kargad.cerias.p 128.10.19.24     2 u   93  128  377   67.449  -23.736   5.169
+adsl-99-132-102 132.239.1.6      2 u   36  128  377   61.278  -14.967   5.423
 GPS_NMEA(0)     .GPS.            1 l    -   16    0    0.000    0.000   0.000

ppstest output:

trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1258747579.664897474, sequence: 10484 - clear  0.000000000, sequence: 0
source 0 - assert 1258747580.664897701, sequence: 10485 - clear  0.000000000, sequence: 0
source 0 - assert 1258747581.664891082, sequence: 10486 - clear  0.000000000, sequence: 0
source 0 - assert 1258747582.664898437, sequence: 10487 - clear  0.000000000, sequence: 0


I have built the patched kernel 2.5.31.5, patched ntpd and ldattach.  Here's a copy
of our relevant sections from the ntp.conf file:

# PPS stuff
# Driver 20
server  127.127.20.0 prefer minpoll 4
fudge   127.127.20.0 stratum 1 flag1 0 flag2 0 flag3 1 time1 0.0

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.fedora.pool.ntp.org
server 1.fedora.pool.ntp.org
server 2.fedora.pool.ntp.org

The questions are:  how can I tell

1) that ntp is using the GPS time stamp
2) that PPS is being used to synchronize that time stamp
3) that ntp is updating the system time using the GPS time (i.e., time stamp + PPS)"

Thanks,

Allan



More information about the LinuxPPS mailing list