[mythtv-users] Backend Watchdog??
Alexander Böhm
babyfly at gmx.net
Tue Jan 23 09:09:06 UTC 2007
Just wrote this little shellscript, which does exactly what you need i
think :-)
Also it does a ääähmm let say LOG Rotation... and saves chrashes in an
extra file
Look in it and you get what i mean :-)
##---------------------------------------------------------------------------------------------------------------
#!/bin/bash
#
# mythbackend-init.sh v.1.2
#
# Mythbackend startscript and wrapper to restart if crasch occours.
# copys crashed session logs also to an extra file to search problems
more easyly
# and creates a new one for the restartet session.
if [ -f /var/log/mythtv/mythbackend.log ]; then
mv /var/log/mythtv/mythbackend.log /var/log/mythtv/mythbackend.last.log
echo -n `date` >> /var/log/mythtv/mythbackend.last.log
fi
while [ true ]; do
/usr/bin/mythbackend >> /var/log/mythtv/mythbackend.log 2>&1 &
wait $!
echo "MythBackend Server CRASHED !!!" >> /var/log/mythtv/mythbackend.log
cp /var/log/mythtv/mythbackend.log
/var/log/mythtv/mythbackend.crashed #Copy the logfile of the current
crashed session to
#an
extra place
sleep 10
done
##------------------------------------------------------------------------------------------------------------------------------
greets and HTH
Alex
Dave Ansell schrieb:
> ----- Original Message -----
> From: "Dave Ansell" <dave at theansells.com>
> To: <mythtv-users at mythtv.org>
> Sent: Monday, January 22, 2007 8:06 PM
> Subject: [mythtv-users] Backend Watchdog??
>
>
> Hi,
>
> I'm a dedicated myth fan for nearly two years now.
>
> My backend system has had several incarnations from Fc3 to Fc6 on two
> different hardware platforms.
>
> My only issue is that the backend service occasionally dies for no
> aparent reason. This has been the case in every incarnation to date,
> whatever I try. It doesnt happen often, but enought to be annoying and
> reduce WAF etc.
>
> I guess this behaviour is to be expected with any developing software.
> However it strikes me that it would be relatively simple to set up an
> independant process to monitor the status of the backend and kick it back
> into life automatically if it dies. (ie what I do now manually!)
>
> I fully accept that the answer to how to do this may be trivial, but I
> am light on linux skills so if someone could help me out I would be very
> gratefull!
>
> many thanks,
> Dave
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>
>
> Thanks for all the suggestions. Plenty of options to try!
> cheers,
> Dave
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
More information about the mythtv-users
mailing list