[LinuxPPS] PPS/ntpd fails on fresh startup

Luca Bertagnolio time at berta.com
Mon Oct 13 15:47:23 CEST 2008


Rodolfo, when you have a minute can you comment on my issue?

Why would LinuxPPS fail at the first startup, and work the second time?

Thanks, Luca

On Tue, Oct 7, 2008 at 2:08 AM, Luca Bertagnolio <time at berta.com> wrote:
> Reg,
>
>> Try putting a 'sleep 5' after the section with ppsldisc, and before starting ntpd.
>>
>> Its ugly, but it should work.
>> The problem is that it takes the system some time to set up the ldisc, and
>> it probably isnt worth trying to wait (cleanly) for this to happen.  In your
>> init startup you get to the point where you need the pps device before its
>> available.
>>
>> In any case, works for me...
>
> it doesn't for me.  From the dmesg log, looks like ppsldisc starts to work OK
> with the script sleeping for 5 seconds, then as soon as ntpd starts, the same
> as before happens:
>
> 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 1223337678.357389483
> capture clear seq #1 for source 0
> PPS clear at 70319 on source #0
> PPS event on source 0 at 1223337679.157620784
> capture assert seq #1 for source 0
> PPS assert at 70519 on source #0
> PPS event on source 0 at 1223337679.357679447
> capture clear seq #2 for source 0
> PPS clear at 70569 on source #0
> PPS event on source 0 at 1223337680.157910748
> capture assert seq #2 for source 0
> PPS assert at 70769 on source #0
> PPS event on source 0 at 1223337680.357969411
> capture clear seq #3 for source 0
> PPS clear at 70819 on source #0
> PPS event on source 0 at 1223337681.158201551
> capture assert seq #3 for source 0
> PPS assert at 71019 on source #0
> PPS event on source 0 at 1223337681.358260214
> capture clear seq #4 for source 0
> PPS clear at 71069 on source #0
> PPS event on source 0 at 1223337682.158491515
> capture assert seq #4 for source 0
> PPS assert at 71269 on source #0
> PPS event on source 0 at 1223337682.358550178
> capture clear seq #5 for source 0
> PPS clear at 71319 on source #0
> PPS event on source 0 at 1223337683.158781479
> capture assert seq #5 for source 0
> PPS assert at 71519 on source #0
> PPS event on source 0 at 1223337683.358841819
> capture clear seq #6 for source 0
> PPS clear at 71569 on source #0   <-------------- sleep 5 ends here
> 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
>
> Needless to say, after stopping and restarting ntpd works fine again...
>
> Ciao, Luca
>



More information about the LinuxPPS mailing list