[mythtv-users] RE:FW: Potentially Useful Scripts
William Powers
wepprop at sbcglobal.net
Wed Dec 24 10:00:39 EST 2003
I've had a variation of the first script running for quite a while with
useful results. I did not have a 0B file checker, though, and since I
lost three movies last night to that particular annoyance, I think it's
time I added that to my 'mythmon' script.
I have the following thoughts for your consideration:
1) Unloading ivtv with the backend still running is problematic, since
the module is in use. I suggest stopping the backend, unloading the
modules, (re)loading the modules, and (re)starting the backend.
2) I have two pvr-250's and I've had the second encoder start to
produce 0B files while the first encoder was in the middle of recording
a valid (?) program. For that reason, I'm considering adding an
additional check so that the 0B recovery steps don't execute unless the
number of 0B files with a current timestamp is greater than zero AND is
equal to the total number of files with a current timestamp, like so:
NOW=`date '+%b %e %R'`
RUNNING=`eval ls -l $VIDEODIR/*\.nuv | grep "$NOW" | wc -l | awk '{
print $1 }'`
ZERO=`eval ls -l $VIDEODIR/*\.nuv | grep " 0 $NOW" | wc -l | awk '{
print $1 }'`
if [ $ZERO -gt "0" ]; then
if [ $ZERO -eq $RUNNING ]; then
/etc/rc.d/init.d/$PROCESS stop
rmmod -r ivtv tuner msp3400 saa7115
modprobe ivtv
/etc/rc.d/init.d/$PROCESS start
/bin/date +"Mythbackend restarted (0B file) at: %c" >> $LOG
exit 1
fi
fi
This is, of course, based on the assumption that the first recording in
progress is not impacted at all by the driver hiccup, which is by no
means guaranteed. If both recordings always turn out to be toast, then
it would obviously be better to unload the drivers immediately once the
first 0B file shows up.
For my part, I can run using only a single encoder for days on end
without incident, but as soon as encoder 2 kicks in, something goes
wrong more than half of the time. Until recently, I was stuck at
myth-0.11 and couldn't upgrade for some screwy reason and with that
version I would usually get a backend crash. Last week I did a clean
install of fedora core 1 & atrpms myth, ivtv, et al, and now that
everything is current, I haven't had a backend crash (yet - fingers
crossed).
But now the ivtv drivers seem to hiccup up whenever one encoder is
running and the other one starts a new recording. Maybe this will be
helped by the (pending) new version of the ivtv driver.
Bill
More information about the mythtv-users
mailing list