[LinuxPPS] RIPE NCC interface: needing help

Kiss Gabor (Bitman) kissg at ssg.ki.iif.hu
Fri May 21 16:14:58 CEST 2010


> > Certainly. However at this moment RIPENCC driver is not compiled in
> > by default. (I mean Debian package.)
> > I tried to recompile ntpd yesterday a few times but it failed because
> > vital C header files are missing. (timepps.h and others)
> > Now I slow down and I try to figure out the next step.
> 
> See the wiki for timepps.h.
> http://wiki.enneenne.com/index.php/LinuxPPS_installation#The_userland_tools
> 
> What about the other header files? Did you build your kernel yourself?

- kernel 2.6.34 is running.
- pps-tools are compiled
- modules and line discipline loaded, /sys/class/pps/pps0 and /dev/pps0 found.
- ppstest is OK.
- ntpd is reconfigured with --enable-debugging, recompiled with new timepps.h.

Experiences:
============

server 127.127.22.0
fudge 127.127.22.0 time1 0.020

root at time1:/dev# /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:109 -d -d --nofork
ntpd 4.2.6 at 1.2089-o Fri May 21 13:47:47 UTC 2010 (1)
addto_syslog: set_process_priority: Leave priority alone: priority_done is <2>
addto_syslog: proto: precision = 0.924 usec
loop_config: item 1 freq 0.000000
event at 0 0.0.0.0 c01d 0d kern kernel time sync enabled
Finished Parsing!!
create_sockets(123)
addto_syslog: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
addto_syslog: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
created interface #0: fd=16, bfd=-1, name=v4wildcard, flags=0x89, scope=0, sin=0.0.0.0, bcast=0.0.0.0, mask=255.255.255.255, Disabled:
addto_syslog: Listen and drop on 1 v6wildcard :: UDP 123
created interface #1: fd=17, bfd=-1, name=v6wildcard, flags=0x81, scope=0, sin=::, Disabled:
create_interface(127.0.0.1#123)
addto_syslog: Listen normally on 2 lo 127.0.0.1 UDP 123
restrict: addr 7f000001 mask ffffffff mflags 00003000 flags 00000001
created interface #2: fd=18, bfd=-1, name=lo, flags=0x5, scope=0, sin=127.0.0.1, mask=255.0.0.0, Enabled:
create_interface(XXX.XXX.XXX.XXX#123)
addto_syslog: Listen normally on 3 eth0 XXX.XXX.XXX.XXX UDP 123
restrict: addr c36f609e mask ffffffff mflags 00003000 flags 00000001
created interface #3: fd=19, bfd=-1, name=eth0, flags=0x19, scope=0, sin=XXX.XXX.XXX.XXX, bcast=XXX,XXX,XXX,XXX, mask=255.255.255.252, Enabled:
create_interface(::1#123)
addto_syslog: Listen normally on 4 lo ::1 UDP 123
created interface #4: fd=20, bfd=-1, name=lo, flags=0x1, scope=0, sin=::1, Enabled:
create_interface(2001:XXX:XXX:XXX:XXX:XXX:XXX:XXX#123)
addto_syslog: Listen normally on 5 eth0 2001:XXX:XXX:XXX:XXX:XXX:XXX:XXX UDP 123
created interface #5: fd=21, bfd=-1, name=eth0, flags=0x1, scope=0, sin=2001:XXX:XXX:XXX:XXX:XXX:XXX:XXX, Enabled:
create_interface(fe80::XXX:XXX:XXX:XXX#123)
addto_syslog: Listen normally on 6 eth0 fe80::XXX:XXX:XXX:XXX UDP 123
created interface #6: fd=22, bfd=-1, name=eth0, flags=0x1, scope=2, sin=fe80::XXX:XXX:XXX:XXX, Enabled:
create_sockets: Total interfaces = 7
auth_setkey: key 65535 type 4 len 4 9e15dc6d
getnetnum given 0.0.0.0, got 0.0.0.0
getnetnum given 255.255.255.255, got 255.255.255.255
restrict: addr 00000000 mask ffffffff mflags 00000000 flags 000005d0
getnetnum given ::, got ::
getnetnum given ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, got ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
getnetnum given 127.0.0.1, got 127.0.0.1
restrict: addr 7f000001 mask ffffffff mflags 00000000 flags 00000000
getnetnum given ::1, got ::1
key_expire: at 0 associd 48632
peer_clear: at 0 next 1 associd 48632 refid INIT
event at 0 PPS(0) 8011 81 mobilize assoc 48632
newpeer: 127.0.0.1->127.127.22.0 mode 3 vers 4 poll 6 6 flags 0x9 0x1 ttl 0 key 00000000
getnetnum given 127.127.22.0, got 127.127.22.0
event at 0 0.0.0.0 c016 06 restart
loop_config: item 2 freq 0.000000
event at 0 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
local_clock: mu 0 state 2 poll 3 count 0
refclock_transmit: at 1 127.127.22.0
poll_update: at 1 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
auth_agekeys: at 1 keys 1 expired 0
timer: interface update
refclock_transmit: at 65 127.127.22.0
poll_update: at 65 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
refclock_transmit: at 129 127.127.22.0
poll_update: at 129 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
refclock_transmit: at 193 127.127.22.0
poll_update: at 193 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
refclock_transmit: at 257 127.127.22.0
poll_update: at 257 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
timer: interface update
refclock_transmit: at 321 127.127.22.0
poll_update: at 321 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
refclock_transmit: at 385 127.127.22.0
poll_update: at 385 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
refclock_transmit: at 449 127.127.22.0
poll_update: at 449 127.127.22.0 poll 6 burst 0 retry 0 head 0 early 2 next 64
...

ntpq> rl
associd=0 status=c012 leap_alarm, sync_unspec, 1 event, freq_set,
version="ntpd 4.2.6 at 1.2089-o Fri May 21 13:47:47 UTC 2010 (1)",
processor="i686", system="Linux/2.6.34-kissg", leap=11, stratum=16,
precision=-20, rootdelay=0.000, rootdisp=6.195, refid=INIT,
reftime=00000000.00000000  Thu, Feb  7 2036  7:28:16.000,
clock=cfa10fb8.237f8c3e  Fri, May 21 2010 15:57:12.138, peer=0, tc=3,
mintc=3, offset=0.000, frequency=0.000, sys_jitter=0.000,
clk_jitter=0.001, clk_wander=0.000
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 PPS(0)          .PPS.            0 l    -   64    0    0.000    0.000   0.000
ntpq> 

As far as I can see ntpd has some problem. :-)
Yes, I suspect I have to discuss this on other forums.
Just tell me if have to to something with other softwares including kernel.

BTW. I wonder how can a PPS reference clock figure out the absolute time?
If I understand well, driver 22 listens only the DCD pin of
serial port but does not care what the GPS receiver says.
So it knows very accurate when the nex second starts but
it cannot know _which_ second is this.

Thanks for all the help. :-)

Gabor



More information about the LinuxPPS mailing list