[LinuxPPS] Some debug

Luca Bertagnolio lucaberta at yahoo.com
Thu Sep 18 18:08:53 CEST 2008


Here is some debug info I have just gathered.

The modules are automatically loaded upon machine startup:

tix ~ # lsmod
Module                  Size  Used by
pps_ldisc               2592  0
pps_core                7644  1 pps_ldisc

Loading ppsldisc:

tix ~ # /usr/local/sbin/ppsldisc /dev/ttyS1 &

source serial1 got cdev (253:0)
new PPS source serial1 at ID 0
PPS source #0 "/dev/ttyS1" added
PPS event on source 0 at 1221752734.126042132
capture assert seq #1 for source 0
[STDev] PPS assert at 53257 on source #0
PPS event on source 0 at 1221752734.326095768
capture clear seq #1 for source 0
[STDev] PPS clear at 53307 on source #0
PPS event on source 0 at 1221752735.126330421
capture assert seq #2 for source 0
[STDev] PPS assert at 53507 on source #0
PPS event on source 0 at 1221752735.326385732
capture clear seq #2 for source 0
[STDev] PPS clear at 53557 on source #0
PPS event on source 0 at 1221752736.126619547
capture assert seq #3 for source 0
[STDev] PPS assert at 53757 on source #0
PPS event on source 0 at 1221752736.326675696
capture clear seq #3 for source 0
[STDev] PPS clear at 53807 on source #0

Running ppstest:

tix ~ # ppstest /dev/pps0

PPS_GETCAP: source 0
PPS_GETPARAMS: source 0
PPS_SETPARAMS: source 0
time format unspecified (33)
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752925.181384265
capture assert seq #192 for source 0
[STDev] PPS assert at 101021 on source #0
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752925.381437900
capture clear seq #192 for source 0
[STDev] PPS clear at 101071 on source #0
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752926.181672554
capture assert seq #193 for source 0
[STDev] PPS assert at 101271 on source #0
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752926.381727865
capture clear seq #193 for source 0
[STDev] PPS clear at 101321 on source #0
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752927.181961680
capture assert seq #194 for source 0
[STDev] PPS assert at 101521 on source #0
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752927.382017829
capture clear seq #194 for source 0
[STDev] PPS clear at 101571 on source #0
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752928.182251644
capture assert seq #195 for source 0
[STDev] PPS assert at 101771 on source #0
PPS_FETCH: source 0
timeout 3.000000000
PPS event on source 0 at 1221752928.382307793
capture clear seq #195 for source 0
[STDev] PPS clear at 101821 on source #0
PPS_FETCH: source 0
timeout 3.000000000
pending signal caught
PPS event on source 0 at 1221752929.182543285
capture assert seq #196 for source 0
[STDev] PPS assert at 102021 on source #0

Starting ntpd, first issues:

tix ~ # /etc/init.d/ntpd start

PPS_GETCAP: source 0
PPS_SETPARAMS: source 0
PPS_GETCAP: source 0
PPS_SETPARAMS: source 0
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000

Whoops! And even after stopping ntpd things remain the same:

tix ~ # /etc/init.d/ntpd stop

PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000
PPS_FETCH: source 0
timeout 0.000000000

And this is where ppstest fails:

tix ~ # ppstest /dev/pps0

PPS_GETCAP: source 0
PPS_GETPARAMS: source 0
PPS_SETPARAMS: source 0
PPS_FETCH: source 0
timeout 3.000000000
pending signal caught

So clearly starting ntpd messes up PPS API somewhere.

Killing ppsldisc and restarting it cures the problem, though.  And funnily enough, now ntpd seems to be working fine!

PPS event on source 0 at 1221753829.351403521
capture assert seq #85 for source 0
[STDev] PPS assert at 327086 on source #0
PPS_FETCH: source 0
timeout 0.000000000
PPS event on source 0 at 1221753829.551402190
capture clear seq #85 for source 0
[STDev] PPS clear at 327136 on source #0
PPS event on source 0 at 1221753830.351400216
capture assert seq #86 for source 0
[STDev] PPS assert at 327336 on source #0
PPS_FETCH: source 0
timeout 0.000000000
PPS event on source 0 at 1221753830.551400560
capture clear seq #86 for source 0
[STDev] PPS clear at 327387 on source #0
PPS event on source 0 at 1221753831.351397749
capture assert seq #87 for source 0
[STDev] PPS assert at 327587 on source #0
PPS_FETCH: source 0
timeout 0.000000000
PPS event on source 0 at 1221753831.551398931
capture clear seq #87 for source 0
[STDev] PPS clear at 327637 on source #0
PPS event on source 0 at 1221753832.351395282
capture assert seq #88 for source 0
[STDev] PPS assert at 327837 on source #0
PPS_FETCH: source 0
timeout 0.000000000
PPS event on source 0 at 1221753832.551396464
capture clear seq #88 for source 0
[STDev] PPS clear at 327887 on source #0
PPS event on source 0 at 1221753833.351394491

Any info on what might cause the issue with ntpd and ppsldisc?  What more can I debug, and how?

Thanks, Luca



More information about the LinuxPPS mailing list