Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Automatic restart of VDR on ring buffer errors



Hi,

I've seen the dreaded "ring buffer overflow" errors a few times during
these last few weeks, and was thinking about a way to restart VDR when
they happen. I'm not 100% sure that a restart is necessary, as VDR seems
to be able to recover from them sometimes.

Anyway, I tested "swatch" (apt-get install swatch) to monitor
/var/log/syslog and look for the messages and restart VDR when they come.
Seems to work fine so far, at least for my simple tests.

This is what I have in a file /root/swatchrc_vdr:

watchfor /.*ring buffer overflow.*/
    exec /etc/init.d/runvdr stop && sleep 3 && /etc/init.d/runvdr start

The init-script "runvdr" is something I hacked up a while ago, but a
simple "killall" and "vdr" would work too I think.

I start swatch like this:

   % swatch --config-file=/root/swatchrc_vdr --tail-file=/var/log/syslog

The tool could most likely be adapted to watch for other errors too, such
as broken streams and whatnot. I *do* run the internal VDR watchdog, but
I'm not really sure what it's supposed to do, it's never restarted VDR for
me, no matter how serious or trivial the error that VDR got. :)

Maybe this helps someone.

	Chakie
-- 

              Many an ancient lord's last words had been:
         "You can't kill me because I've got magic aaargh...."
                                      -- Terry Pratchett, Interesting Times


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index