[LinuxPPS] PPS stops working after a few seconds

Folkert van Heusden folkert at vanheusden.com
Thu Mar 26 22:38:37 CET 2009


my solution was not using the ntp from the distribution (i run debian)
but using the minimalistic compilation of ntp

On Thu, Mar 26, 2009 at 10:50:32AM -0700, Hal V. Engel wrote:
> On Thursday 26 March 2009 10:33:22 am Udo van den Heuvel wrote:
> > clemens at dwf.com wrote:
> > > Join the club.
> >
> > Which one? ;-)
> >
> > > This is another instance of the problem that Hal V. Engel and I discussed
> > > about a month ago.  I have seen it (mainly) on startup, and Hal's
> > > suggestion to start ntpd, stop it, then restart it, works.  It would be
> > > nice to know what the problem is with linuxPPS that this works around,
> > > but it does consistantly start for me now.
> > >
> > > You dont say if this is just after a reboot (and you never had ntpd
> > > running) or if it just 'happened', but from the counts it looks like the
> > > latter.
> >
> > It happened.
> > ntpd was running for a few weeks on my trusty VIA EK8000.
> >
> > > I have seen this same behaviour of the counts increasing by one each time
> > > I do something, and assume that it should be a clue as to what is wrong
> > > with the code.
> > >
> > > So, no solution, but welcome to the club.
> >
> > No solution?
> >
> > > [[ As I mentioned above, Hal's suggestion of starting ntpd (from init.d)
> > > waiting 20sec, killing ntpd, then restarting ntpd works for me. ]]
> >
> > Ah, a workaround...!
> > Will try!
> 
> My current solution involves a wrapper init script that starts ppsldisc and 
> then ntpd (by calling the normal ntp init script - /etc/init.d/ntpd start) and 
> then killing both and then restarting these a second time.  I have my custom 
> wrapper script (/etc/init.d/ntp-pps) setup as a startup script for the default 
> run level.   I have attached a copy of my wrapper script as an example since 
> it will likely need to be modified for your distro and how things are setup on 
> your machine.  
> 
> Using this wrapper script makes the ntp startup 100% reliable after restarting 
> my system.  But if I only start ppsldisc and ntpd once after a system restart 
> it always fails.   This workaround is a hack and it would be nice if the 
> underlaying issue was fixed. 
> 
> Hal

> #!/sbin/runscript
> depend() {
>         need net
>         use dns logger
>         after  ntp-client
> }
> 
> start() {
> 
>         ebegin "Starting custom ntpd"
> 
>         /bin/ppsldisc /dev/ttyS1 &
>         sleep 5 # give ppsldisc and udev time to get settled
> 
>         /etc/init.d/ntpd start
> 
>         sleep 20 # give ntpd time to start before killing ppsldisc
>         killall ppsldisc
>         /etc/init.d/ntpd stop
> 
>         /bin/ppsldisc /dev/ttyS1 &
>         sleep 5
>         /etc/init.d/ntpd start
>         sleep 50 # give ntpd time to start before killing ppsldisc
> 
>         killall ppsldisc
> }
> 
> stop() {
>         ebegin "Stopping custom ntpd"
>         /etc/init.d/ntpd stop
> }
> 
> 

> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support


Folkert van Heusden

-- 
MultiTail cok yonlu kullanimli bir program, loglari okumak, verilen
kommandolari yerine getirebilen. Filter, renk verme, merge, 'diff-
view', vs.  http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com



More information about the LinuxPPS mailing list