Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Script to keep DCT-6xxx boxes alive

 

 

First page Previous page 1 2 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded


trgreer at gmail

Jun 28, 2007, 3:05 PM

Post #1 of 27 (2070 views)
Permalink
Script to keep DCT-6xxx boxes alive

I've been using MythTV for a couple of years now. I absolutely love
it. My thanks to the developers.

In my home, I have four combo frontend/backend systems. Three have
Motorola DCT-6xxx boxes attached. The fourth is connected to an
HDHomeRun unit.

At this point, the system is pretty stable. However, my most frequent
points of failure are the DCT boxes. Every couple of days one of the
boxes just decides to stop responding.

Jim Westfall's firewire_tester program was a godsend. Whenever one of
the boxes would go to sleep, one or two shots of firewire_tester would
bring it back to life.

I figured that a good way to keep the DCT boxes alive was to run
firewire_tester in cron. The big problem was making sure Myth was not
already streaming from the box.

So I decided to write my first shell script to test whether the boxes
were already busy, and if not, then to execute firewire_tester.

I wanted one script that would run successfully on each of the three
boxes. In addition, I wanted it to be robust enough to determine
which port connected to the DCT box (the assigned port may change on
reboot).

So the script, first gets the status report output in xml from the
master backend (in order to determine which tuner is connected to this
backend and whether it is busy).

Then it runs plugreport to determine whether which port is active.

Finally, it executes firewire_tester (if the tuner is not in use).

I am posting the script here because it may be of use to people who
are be experiencing the similar problems. If you have your DCT boxes
daisy-chained or if your node is not always zero, then you will need
to tweak the script. Otherwise, I believe it will work as it is for
you.

In addition, since this is my first shell script, I'd appreciate some
constructive feedback on form.

Tom
Attachments: keep_dct_alive.sh (0.95 KB)


praetor.zero at gmail

Jun 28, 2007, 5:24 PM

Post #2 of 27 (2030 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

How often do you run this? What is your cron schedule?

On 6/28/07, Tom Greer <trgreer [at] gmail> wrote:
>
> I've been using MythTV for a couple of years now. I absolutely love
> it. My thanks to the developers.
>
> In my home, I have four combo frontend/backend systems. Three have
> Motorola DCT-6xxx boxes attached. The fourth is connected to an
> HDHomeRun unit.
>
> At this point, the system is pretty stable. However, my most frequent
> points of failure are the DCT boxes. Every couple of days one of the
> boxes just decides to stop responding.
>
> Jim Westfall's firewire_tester program was a godsend. Whenever one of
> the boxes would go to sleep, one or two shots of firewire_tester would
> bring it back to life.
>
> I figured that a good way to keep the DCT boxes alive was to run
> firewire_tester in cron. The big problem was making sure Myth was not
> already streaming from the box.
>
> So I decided to write my first shell script to test whether the boxes
> were already busy, and if not, then to execute firewire_tester.
>
> I wanted one script that would run successfully on each of the three
> boxes. In addition, I wanted it to be robust enough to determine
> which port connected to the DCT box (the assigned port may change on
> reboot).
>
> So the script, first gets the status report output in xml from the
> master backend (in order to determine which tuner is connected to this
> backend and whether it is busy).
>
> Then it runs plugreport to determine whether which port is active.
>
> Finally, it executes firewire_tester (if the tuner is not in use).
>
> I am posting the script here because it may be of use to people who
> are be experiencing the similar problems. If you have your DCT boxes
> daisy-chained or if your node is not always zero, then you will need
> to tweak the script. Otherwise, I believe it will work as it is for
> you.
>
> In addition, since this is my first shell script, I'd appreciate some
> constructive feedback on form.
>
> Tom
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>


trgreer at gmail

Jun 28, 2007, 5:39 PM

Post #3 of 27 (2038 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

Tom Flair wrote:
> How often do you run this? What is your cron schedule?

I run it every hour at 25 and 55 minutes after the hour.

Here is the crontab entry:
25,55 * * * * /video_new/common/keep_dct_alive.sh
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


freedenizen at gmail

Jun 28, 2007, 5:39 PM

Post #4 of 27 (2026 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

I have one backend with 3 tuners, only one is a dct-6200 it is
currently on node 1. The script seems to be failing at the
tuner_state check:
------------------
Start time: Thu Jun 28 17:33:34 PDT 2007
--17:33:34-- http://localhost:6544/xml
=> `xml'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:6544... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13,242 (13K) [text/xml]

0K .......... .. 100%

17:33:35 (447.06 MB/s) - `xml' saved [13242/13242]

libiec61883 error: error reading oMPR
libiec61883 error: error reading iMPR
./keep_dct_alive.sh: line 24: [: too many arguments
Finish time: Thu Jun 28 17:33:35 PDT 2007

one of the tuners is recording, but the dct tuner isn't, in any event
I don't think the current script can handle multiple tuners in a box
yet, right?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


praetor.zero at gmail

Jun 28, 2007, 5:54 PM

Post #5 of 27 (2020 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/28/07, Asher <freedenizen [at] gmail> wrote:
>
> I have one backend with 3 tuners, only one is a dct-6200 it is
> currently on node 1. The script seems to be failing at the
> tuner_state check:
> ------------------
> Start time: Thu Jun 28 17:33:34 PDT 2007
> --17:33:34-- http://localhost:6544/xml
> => `xml'
> Resolving localhost... 127.0.0.1
> Connecting to localhost|127.0.0.1|:6544... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 13,242 (13K) [text/xml]
>
> 0K .......... .. 100%
>
> 17:33:35 (447.06 MB/s) - `xml' saved [13242/13242]
>
> libiec61883 error: error reading oMPR
> libiec61883 error: error reading iMPR
> ./keep_dct_alive.sh: line 24: [.: too many arguments
> Finish time: Thu Jun 28 17:33:35 PDT 2007
>
> one of the tuners is recording, but the dct tuner isn't, in any event
> I don't think the current script can handle multiple tuners in a box
> yet, right?
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>



Same error, but none of the tuners are recording.

------------------
Start time: Thu Jun 28 19:53:17 CDT 2007
--19:53:17-- http://demon-xanth:6544/xml
=> `xml'
Resolving demon-xanth... 127.0.0.1
Connecting to demon-xanth|127.0.0.1|:6544... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12,031 (12K) [text/xml]

0K .......... . 100%

19:53:17 (1.02 GB/s) - `xml' saved [12031/12031]

libiec61883 error: error reading oMPR
libiec61883 error: error reading iMPR
./keep_dct_alive.sh: line 24: [.: too many arguments
Finish time: Thu Jun 28 19:53:17 CDT 2007
-----------------------------



Host Adapter 0
==============

Node 0 GUID 0x0011d8000139625f
------------------------------
libiec61883 error: error reading oMPR
libiec61883 error: error reading iMPR

Node 1 GUID 0x001aadfffe4bcf7e
------------------------------
oMPR n_plugs=1, data_rate=2, bcast_channel=0
oPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
channel=0, data_rate=2, overhead_id=0, payload=376
iMPR n_plugs=0, data_rate=2


trgreer at gmail

Jun 28, 2007, 6:24 PM

Post #6 of 27 (2022 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/28/07, Tom Flair <praetor.zero [at] gmail> wrote:
>
>
> On 6/28/07, Asher <freedenizen [at] gmail> wrote:
> > I have one backend with 3 tuners, only one is a dct-6200 it is
> > currently on node 1. The script seems to be failing at the
> > tuner_state check:
> > ------------------
> > Start time: Thu Jun 28 17:33:34 PDT 2007
> > --17:33:34-- http://localhost:6544/xml
> > => `xml'
> > Resolving localhost... 127.0.0.1
> > Connecting to localhost|127.0.0.1|:6544... connected.
> > HTTP request sent, awaiting response... 200 OK
> > Length: 13,242 (13K) [text/xml]
> >
> > 0K .......... ..
> 100%
> >
> > 17:33:35 (447.06 MB/s) - `xml' saved [13242/13242]
> >
> > libiec61883 error: error reading oMPR
> > libiec61883 error: error reading iMPR
> > ./keep_dct_alive.sh: line 24: [.: too many arguments
> > Finish time: Thu Jun 28 17:33:35 PDT 2007
> >
> > one of the tuners is recording, but the dct tuner isn't, in any event
> > I don't think the current script can handle multiple tuners in a box
> > yet, right?
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users [at] mythtv
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
>
>
>
> Same error, but none of the tuners are recording.
>
> ------------------
> Start time: Thu Jun 28 19:53:17 CDT 2007
> --19:53:17-- http://demon-xanth:6544/xml
> => `xml'
> Resolving demon-xanth... 127.0.0.1
> Connecting to demon-xanth|127.0.0.1|:6544... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 12,031 (12K) [text/xml]
>
> 0K .......... .
> 100%
>
> 19:53:17 (1.02 GB/s) - `xml' saved [12031/12031]
>
> libiec61883 error: error reading oMPR
> libiec61883 error: error reading iMPR
> ./keep_dct_alive.sh: line 24: [.: too many arguments
> Finish time: Thu Jun 28 19:53:17 CDT 2007
> -----------------------------
>
>
>
> Host Adapter 0
> ==============
>
> Node 0 GUID 0x0011d8000139625f
> ------------------------------
> libiec61883 error: error reading oMPR
> libiec61883 error: error reading iMPR
>
> Node 1 GUID 0x001aadfffe4bcf7e
> ------------------------------
> oMPR n_plugs=1, data_rate=2, bcast_channel=0
> oPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
> channel=0, data_rate=2, overhead_id=0, payload=376
> iMPR n_plugs=0, data_rate=2
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Multiple tuners should not be a problem. But something is different.
Can you send me a copy of your xml file?

Thanks.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


freedenizen at gmail

Jun 28, 2007, 6:30 PM

Post #7 of 27 (2020 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

here is my xml file
Attachments: xml (12.2 KB)


gaberubin at gmail

Jun 28, 2007, 9:22 PM

Post #8 of 27 (2019 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

Same issue for me too. Attached is my xml file.
Attachments: xml (9.72 KB)


trgreer at gmail

Jun 28, 2007, 9:52 PM

Post #9 of 27 (2020 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/28/07, Asher <freedenizen [at] gmail> wrote:
> here is my xml file
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

I see the problem. Not only do I not handle multiple tuners properly;
but I can't tell which are firewire and which are not.

I'm gonna need to think about that...

Somewhere in 0.20 updates. that info was added to the database. What
version are you on?

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


trgreer at gmail

Jun 28, 2007, 9:56 PM

Post #10 of 27 (2018 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/28/07, Tom Greer <trgreer [at] gmail> wrote:
> On 6/28/07, Asher <freedenizen [at] gmail> wrote:
> > here is my xml file
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users [at] mythtv
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
> I see the problem. Not only do I not handle multiple tuners properly;
> but I can't tell which are firewire and which are not.
>
> I'm gonna need to think about that...
>
> Somewhere in 0.20 updates. that info was added to the database. What
> version are you on?
>
> Tom

Never mind. I see it in the xml file. 0.20.20070327-1.

I'll get back to you. I'm tied up all day tomorrow. Probably over
the weekend sometime.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


adeffs.mythtv at gmail

Jun 29, 2007, 5:38 AM

Post #11 of 27 (1985 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/28/07, Tom Greer <trgreer [at] gmail> wrote:
> I've been using MythTV for a couple of years now. I absolutely love
> it. My thanks to the developers.
>
> In my home, I have four combo frontend/backend systems. Three have
> Motorola DCT-6xxx boxes attached. The fourth is connected to an
> HDHomeRun unit.
>
> At this point, the system is pretty stable. However, my most frequent
> points of failure are the DCT boxes. Every couple of days one of the
> boxes just decides to stop responding.
>
> Jim Westfall's firewire_tester program was a godsend. Whenever one of
> the boxes would go to sleep, one or two shots of firewire_tester would
> bring it back to life.
>
> I figured that a good way to keep the DCT boxes alive was to run
> firewire_tester in cron. The big problem was making sure Myth was not
> already streaming from the box.
>
> So I decided to write my first shell script to test whether the boxes
> were already busy, and if not, then to execute firewire_tester.
>
> I wanted one script that would run successfully on each of the three
> boxes. In addition, I wanted it to be robust enough to determine
> which port connected to the DCT box (the assigned port may change on
> reboot).
>
> So the script, first gets the status report output in xml from the
> master backend (in order to determine which tuner is connected to this
> backend and whether it is busy).
>
> Then it runs plugreport to determine whether which port is active.
>
> Finally, it executes firewire_tester (if the tuner is not in use).
>
> I am posting the script here because it may be of use to people who
> are be experiencing the similar problems. If you have your DCT boxes
> daisy-chained or if your node is not always zero, then you will need
> to tweak the script. Otherwise, I believe it will work as it is for
> you.
>
> In addition, since this is my first shell script, I'd appreciate some
> constructive feedback on form.

you could also try running SVN, which has most of what firewire_tester
does built in (latest SVN build as of two days ago has worked really
well for me with two DCT's daisy chained) and uses the GUID for
identifying boxes, so no more port/node issues either.

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


trgreer at gmail

Jun 29, 2007, 6:11 AM

Post #12 of 27 (1991 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/29/07, Steven Adeff <adeffs.mythtv [at] gmail> wrote:
>
> you could also try running SVN, which has most of what firewire_tester
> does built in (latest SVN build as of two days ago has worked really
> well for me with two DCT's daisy chained) and uses the GUID for
> identifying boxes, so no more port/node issues either.
>
> --
> Steve

I'm running the latest SVN version, and the improvements are great.
But my boxes still go to sleep (not near as often) and then strings of
recordings will fail until I wake them up manually.

Using this routine, I have yet to have a failure.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


joe.borne at gmail

Jun 29, 2007, 6:17 AM

Post #13 of 27 (1982 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

Could someone post this to the SVN repository or another online
location? Those of use who get the mailing list in digest from did not
get the script.

Thanks
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


freedenizen at gmail

Jun 29, 2007, 6:57 AM

Post #14 of 27 (1989 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/28/07, Tom Greer <trgreer [at] gmail> wrote:
> On 6/28/07, Tom Greer <trgreer [at] gmail> wrote:
> > On 6/28/07, Asher <freedenizen [at] gmail> wrote:
> > > here is my xml file
> > >
> > > _______________________________________________
> > > mythtv-users mailing list
> > > mythtv-users [at] mythtv
> > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
> > I see the problem. Not only do I not handle multiple tuners properly;
> > but I can't tell which are firewire and which are not.
> >
> > I'm gonna need to think about that...
> >
> > Somewhere in 0.20 updates. that info was added to the database. What
> > version are you on?
> >
> > Tom
>
> Never mind. I see it in the xml file. 0.20.20070327-1.
>
> I'll get back to you. I'm tied up all day tomorrow. Probably over
> the weekend sometime.
>
> Tom

Hmm weird, I'm 99% sure I've updated both mythweb and the backend
install since March 27.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


trgreer at gmail

Jun 29, 2007, 6:58 AM

Post #15 of 27 (1986 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/29/07, Joe Borne <joe.borne [at] gmail> wrote:
> Could someone post this to the SVN repository or another online
> location? Those of use who get the mailing list in digest from did not
> get the script.
>
> Thanks

You can find it attached to my original post at:
http://www.gossamer-threads.com/lists/mythtv/users/277073

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


trgreer at gmail

Jun 29, 2007, 3:32 PM

Post #16 of 27 (1969 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

OK. I've completely revamped the script. It should be much more
robust in terms of handling multiple tuners and selecting only those
that are firewire tuners.

Since my setup does not have multiple tuners on a backend and/or does
not have a mix of firewire and other type tuners, my test capabilities
are limited.

Give this a try and let me know how this works.

And since I am a complete newbie at script writing, I'd appreciate any
feedback on improvements.

For those of you whose attachments get stripped from these emails,
please visit this thread online at
http://www.gossamer-threads.com/lists/mythtv/users/277073 to download
the script.

Tom
Attachments: keep_dct_alive.sh (2.00 KB)


freedenizen at gmail

Jun 29, 2007, 4:28 PM

Post #17 of 27 (1967 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/29/07, Tom Greer <trgreer [at] gmail> wrote:
> OK. I've completely revamped the script. It should be much more
> robust in terms of handling multiple tuners and selecting only those
> that are firewire tuners.
>
> Since my setup does not have multiple tuners on a backend and/or does
> not have a mix of firewire and other type tuners, my test capabilities
> are limited.
>
> Give this a try and let me know how this works.

Looks good to me, tested it on my config, it found the right tuner and
ran the firewire_tester, I will test it again later when things start
recording.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


gaberubin at gmail

Jun 29, 2007, 8:05 PM

Post #18 of 27 (1976 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

I am still unable to get it work. It is getting a value of "null" for GUID.

I put some echo lines in there:

# then get the GUID from the database...
echo 'Tuner '${LOCAL_TUNER_ARRAY[$i]}' is not busy'
SQL="SELECT videodevice FROM capturecard where
cardid = ${LOCAL_TUNER_ARRAY[$i]}"
GUID=`echo $SQL | $MYSQL`
echo "guid is $GUID"
GUID="0x"`echo $GUID | tr [:upper:] [:lower:]`
# plugreport's GUID is in lower case with a $
echo "guid is $GUID"
# determine which firewire node the tuner is on...
NODE=`plugreport | awk '{if (($1 == "Node")
&& ($4 == "'"$GUID"'")) print $2}'`
echo "node is $NODE"

Here is the relevant part of the log:
Tuner 3 is not busy
guid is NULL
guid is 0xnull
libiec61883 error: error reading oMPR
libiec61883 error: error reading iMPR
node is
Error: Tuner '3' was not found in plugreport
Finish time: Fri Jun 29 19:52:49 PDT 2007
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


gaberubin at gmail

Jun 29, 2007, 8:43 PM

Post #19 of 27 (1958 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/29/07, Gabe Rubin <gaberubin [at] gmail> wrote:
> I am still unable to get it work. It is getting a value of "null" for GUID.
>

<snip>

I was able to get it to work by manually adding the GUID in the
database in the form that this script expects it (all uppercase and
missing the leading 0x. The script now works. But I wonder why the
entry in the videodevice field was empty and if this is something to
worry about in the future?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


trgreer at gmail

Jun 30, 2007, 12:51 PM

Post #20 of 27 (1937 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/29/07, Gabe Rubin <gaberubin [at] gmail> wrote:
> On 6/29/07, Gabe Rubin <gaberubin [at] gmail> wrote:
> > I am still unable to get it work. It is getting a value of "null" for GUID.
> >
>
> <snip>
>
> I was able to get it to work by manually adding the GUID in the
> database in the form that this script expects it (all uppercase and
> missing the leading 0x. The script now works. But I wonder why the
> entry in the videodevice field was empty and if this is something to
> worry about in the future?

Gabe,

I believe that the version that you are running precedes the new
backend tuner changes that were made in later versions of 0.20.

Once you upgrade to this latest version, you will need to delete and
recreate your tuners in mythtv-setup. When you do this MythTV
populates these fields automatically.

I strongly recommend you do, for the new tuner logic provide much more
reliability for firewire connections.

For now, your solution will work.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


adeffs.mythtv at gmail

Jul 7, 2007, 10:05 PM

Post #21 of 27 (1838 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 6/29/07, Tom Greer <trgreer [at] gmail> wrote:
> OK. I've completely revamped the script. It should be much more
> robust in terms of handling multiple tuners and selecting only those
> that are firewire tuners.
>
> Since my setup does not have multiple tuners on a backend and/or does
> not have a mix of firewire and other type tuners, my test capabilities
> are limited.
>
> Give this a try and let me know how this works.
>
> And since I am a complete newbie at script writing, I'd appreciate any
> feedback on improvements.
>
> For those of you whose attachments get stripped from these emails,
> please visit this thread online at
> http://www.gossamer-threads.com/lists/mythtv/users/277073 to download
> the script.
>
> Tom
>

nice work Tom!
Am I correct in that the script is not set up to run firewire_tester
as many times as is needed to stabilize the connection? occasionally
I've had to run it multiple times before it works. I may add some
extra code to make sure it repeats running until the connection is
fixed.

now just to figure out how to have Myth run it after it changes
channels but before it attempts to begin recording... (though in
really it would be best if it just did this on its own in the
backend...)

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


trgreer at gmail

Jul 9, 2007, 8:27 AM

Post #22 of 27 (1814 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 7/7/07, Steven Adeff <adeffs.mythtv [at] gmail> wrote:
> Am I correct in that the script is not set up to run firewire_tester
> as many times as is needed to stabilize the connection? occasionally
> I've had to run it multiple times before it works. I may add some
> extra code to make sure it repeats running until the connection is
> fixed.
>
> now just to figure out how to have Myth run it after it changes
> channels but before it attempts to begin recording... (though in
> really it would be best if it just did this on its own in the
> backend...)

Steve,

The script executes firewire_tester using the -B parameter which
attempts to fix/stabilize a broadcast connection. If you like, you
can add the -r parameter followed by the number times to repeat this
action (e.g -r 5 will cause it to repeat everything 5 times).

I have a cron job that runs this script once every 30 minutes. That
seems to keep the boxes from going to sleep.

What version of myth are you running? There have been some recent
improvements in the backend that have greatly improved firewire
reliability by incorporating some of firewire_tester type logic.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


adeffs.mythtv at gmail

Jul 9, 2007, 12:26 PM

Post #23 of 27 (1807 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 7/9/07, Tom Greer <trgreer [at] gmail> wrote:
> On 7/7/07, Steven Adeff <adeffs.mythtv [at] gmail> wrote:
> > Am I correct in that the script is not set up to run firewire_tester
> > as many times as is needed to stabilize the connection? occasionally
> > I've had to run it multiple times before it works. I may add some
> > extra code to make sure it repeats running until the connection is
> > fixed.
> >
> > now just to figure out how to have Myth run it after it changes
> > channels but before it attempts to begin recording... (though in
> > really it would be best if it just did this on its own in the
> > backend...)
>
> Steve,
>
> The script executes firewire_tester using the -B parameter which
> attempts to fix/stabilize a broadcast connection. If you like, you
> can add the -r parameter followed by the number times to repeat this
> action (e.g -r 5 will cause it to repeat everything 5 times).

I'd rather just run firewire_tester until its fixed, no need to repeat
after that. though i guess it doesn't hurt either. -r 20 should be
more than enough.

> I have a cron job that runs this script once every 30 minutes. That
> seems to keep the boxes from going to sleep.

thats what I think I'll do.

> What version of myth are you running? There have been some recent
> improvements in the backend that have greatly improved firewire
> reliability by incorporating some of firewire_tester type logic.

SVN, sadly it seems to go in and out of reliability. I had a few weeks
were it was fine, then lately it's missed a lot of recordings. When I
notice in the backend log that its trying to capture I'll run
firewire_tester manually and after a few iterations, 3-5 usually, the
box starts streaming to the backend.

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


freedenizen at gmail

Jul 9, 2007, 3:00 PM

Post #24 of 27 (1809 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

I actually modified the script to run prime.sh instead of the
firewire_tester as I use p2p not broadcast. I know firewire_tester
can do that as well but I've had better luck with prime.sh for some
reason.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


adeffs.mythtv at gmail

Jul 11, 2007, 10:32 AM

Post #25 of 27 (1779 views)
Permalink
Re: Script to keep DCT-6xxx boxes alive [In reply to]

On 7/9/07, Steven Adeff <adeffs.mythtv [at] gmail> wrote:
> On 7/9/07, Tom Greer <trgreer [at] gmail> wrote:
> > On 7/7/07, Steven Adeff <adeffs.mythtv [at] gmail> wrote:
> > > Am I correct in that the script is not set up to run firewire_tester
> > > as many times as is needed to stabilize the connection? occasionally
> > > I've had to run it multiple times before it works. I may add some
> > > extra code to make sure it repeats running until the connection is
> > > fixed.
> > >
> > > now just to figure out how to have Myth run it after it changes
> > > channels but before it attempts to begin recording... (though in
> > > really it would be best if it just did this on its own in the
> > > backend...)
> >
> > Steve,
> >
> > The script executes firewire_tester using the -B parameter which
> > attempts to fix/stabilize a broadcast connection. If you like, you
> > can add the -r parameter followed by the number times to repeat this
> > action (e.g -r 5 will cause it to repeat everything 5 times).
>
> I'd rather just run firewire_tester until its fixed, no need to repeat
> after that. though i guess it doesn't hurt either. -r 20 should be
> more than enough.
>
> > I have a cron job that runs this script once every 30 minutes. That
> > seems to keep the boxes from going to sleep.
>
> thats what I think I'll do.
>
> > What version of myth are you running? There have been some recent
> > improvements in the backend that have greatly improved firewire
> > reliability by incorporating some of firewire_tester type logic.
>
> SVN, sadly it seems to go in and out of reliability. I had a few weeks
> were it was fine, then lately it's missed a lot of recordings. When I
> notice in the backend log that its trying to capture I'll run
> firewire_tester manually and after a few iterations, 3-5 usually, the
> box starts streaming to the backend.

I'm getting this when running the script as root, any ideas?

./keep_dct_alive.sh: 24: Syntax error: "(" unexpected


--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

First page Previous page 1 2 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.