[LinuxPPS] Locking problem?

clemens at dwf.com clemens at dwf.com
Wed Feb 4 01:06:37 CET 2009


I didn't want to bring this up when we seemed REAL close to getting the code
into the kernel, but since we seem to be at a standstill again, perhaps someone
else has seen this problem, and perhaps it can be fixed.

I have one machine where linuxPPS just works.

I have another where there are problems.
In a previous note I described this problem,- and the fact that I thought it 
might
be hardware, bought a 4port tty board, and then had the same problems with it.
This machine talks to PPS and a number of external machines, so its startup is 
slower.

So, at the moment, I REALLY think that the problem is software, and that it is 
something that I am doing with my startup scripts to trigger it.  My assumption
is that there is a LOCK missing somewhere in the linuxPPS startup, and thats 
what
Im fishing for with you guys.

NTPD is started from my startup script, and it uses the clever line (that I 
believe
Rodolfo suggested, namely) 

	( /usr/local/bin/ppsldisc $a & sleep 60 ; killall ppsldisc ) >& /dev/null &

	sleep 5
	<<veral lines to discover which /dev/pp? is associated with /dev/ttyS? ($a)
	  and set /dev/oncore.pps.0 >>

	daemon $NTPD -g -c $ntpconf

this starts ppsldisc, runs it for 60sec, then kills it during which time ntpd 
starts.

My current thoughts are that 60sec is not long enough (with several external 
ntp
servers) and I have set it up to 120sec [[ on the other hand, that seems that 
it
should be a works/not works sort of thing, so its not the only problem ]]

The problem is this, if I look at the clockstats file, which prints the 
timestamps,
there will be exactly one timestamp (since the clock has stopped ticking) and 
its
sequence number will be somewhere between 5 and 50.

At this point the pps signal is gone, although on one or two occasions I seem 
to
have been able to revive it, but its not clear what I did to accomplish that.
In any case, usually it is just gone forever, I dont see it if I restart ntpd, 
nor
with ppstest or my ppsapitest8.

Has anyone else seen a problem like this???
Needless to say, if I DONT start ntpd from init.d, and start it by hand, 
everything
works.  Hence my assumption that the delays above need to be longer, so that
whatever LOCK is missing is not relevant [[ or I need to wait for the 
appropriate
/dev/pps? file to be created ]].

So, I put it out to you for your thoughts.
As I said, Im sure its something that I am doing, and the timing with which I 
am doing
it...  But what, thats the question.

-- 
                                        Reg.Clemens
                                        reg at dwf.com





More information about the LinuxPPS mailing list