Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: sp8870 firmware crash - monitor to reload drivers and vdr burn
Hi Carsten:
Thanks so much for the suggestion and for sending over
your runvdr file. Very helpful and gives me lots of
new ideas.
VDR does not exit when the firware crashes .. so what
I am going to try doing is to feed tail -f
/var/log/messages output into a perl script - which
will run another script to killall vdr and reload
drivers if sees a message that the firmware crashed.
BTW - I see you are running burn .. have you had any
problems with the vdrsync script not recognising the
video stream of vdr recordings?
Do different DVB-T streams (ie .. broadcast by
Freeview in UK) differ as per the MPEG TS ?
From a note at end of Burn plugin it appears that they
might. Am going to look into adding transcoding as
well.
Cheers,
David
--- Carsten Koch <Carsten.Koch@icem.com> wrote:
> David Thompson wrote:
> ...
> > Would like to run some sort of a script that
> monitors
> > the syslog for the message ie ..
> >
> > Jan 29 19:18:06 linux kernel: sp8870_set_frontend:
> > firmware crash!!!!!!
> >
> > And when this happens then runs another script
> that
> > kills vdr and reloads drivers and firmware.
> >
> > Can anyone tell me how best to do this?
>
> There are many ways to do that.
>
> Doesnt your VDR exit anyway after the firmware
> crashes?
> If yes, all you have to do is to unload and reload
> the
> driver modules in your runvdr script.
> If no, have you experimented with lower watchdog
> timeouts?
> You can also use the VDR -s option to make VDR
> shutdown
> regularly when it has been idle for a while.
>
> Just as an example, here is my runvdr script, which
> even
> reboots the machine when it detects certain messages
> in
> the log:
>
>
>
-----------------------------------------------------------------------------------------------------------
> #!/bin/sh -x
>
> VDRUSER=cko
> VDRDIR=/home/cko/VDR
> CONFIGDIR=/home/cko/vdrconfig
> TOOLDIR=/home/cko/bin
> VDRCMD="$VDRDIR/vdr -c $CONFIGDIR -P osdteletext -P
> burn -s $TOOLDIR/killvdr"
> LOG=/var/log/update_timers_log
> INTERVAL=60
>
> /bin/setserial /dev/ttyS0 uart none
> modprobe lirc_serial
> /usr/sbin/lircd
> ulimit -c unlimited
> LD_ASSUME_KERNEL=2.4.1;export LD_ASSUME_KERNEL
>
> mount -av
> cd $VDRDIR
>
> find /video -follow -name 'noad.pid' -exec rm '{}'
> \;
> su -c "allnewnoad nice /video" $VDRUSER &
>
> while (true) do
> $TOOLDIR/killvdr
> rmmod budget budget_core dvb_ttpci ttpci_eeprom
> saa7146_vv saa7146 ves1x93 stv0299 l64781 ves1820
> tda8083 stv0297 sp8870 i2c_nforce2 i2c_core dvb_core
> firmware_class video_buf v4l2_common v4l1_compat
> videodev
>
> # if the last timer update was more than $INTERVAL
> minutes ago...
> if [ "`find $LOG -mmin -$INTERVAL`" != $LOG ] ;
> then
> # ...and if we are connected to the internet
> anyway...
> connected=`ssh duron /usr/sbin/isdnctrl
> status isdn0 |cut -c-15`
> if [ "$connected" == "isdn0 connected" ] ;
> then
> date >> $LOG
> $TOOLDIR/update_timers >> $LOG 1>&2
> echo >> $LOG
> fi
> fi
>
> chmod +r /var/log/messages
>
> /usr/sbin/ntpdate duron
>
> modprobe dvb_ttpci vidmode=2
> modprobe budget
>
> su -c "$VDRCMD" $VDRUSER
>
> tail -200 /var/log/messages > /tmp/tail_messages
> if fgrep -q 'emergency exit' /tmp/tail_messages
> || \
> fgrep -q 'nobody cared' /tmp/tail_messages
> || \
> fgrep -q 'page allocation failure'
> /tmp/tail_messages || \
> fgrep -q 'no OSD provider available'
> /tmp/tail_messages || \
> fgrep -qi 'error' /tmp/tail_messages || \
> fgrep -q ' kernel: [<' /tmp/tail_messages
> then
> Mail -s "VDR problem." cko@icem.de <
> /tmp/tail_messages
> /usr/sbin/ntpdate duron
> /sbin/hwclock --systohc
> sleep 2
> sync
> init 6
> sync
> exit 0
> fi
>
> if [ `date +%H` -ge 04 ] && [ `date +%H` -le 05
> ] ; then
> /usr/sbin/ntpdate duron
> /sbin/hwclock --systohc
> sync
> init 6
> sync
> exit 0
> fi
>
> done
>
-----------------------------------------------------------------------------------------------------------
>
>
>
>
>
> Here is the killvdr script it uses:
>
>
-----------------------------------------------------------------------------------------------------------
> #!/bin/sh
> fuser -k -TERM /dev/dvb/*/* > /dev/null
> sleep 3
> fuser -k -KILL /dev/dvb/*/* > /dev/null
>
-----------------------------------------------------------------------------------------------------------
>
>
>
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
Home |
Main Index |
Thread Index