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

Mailing List Archive: MythTV: Users

Question about getting Myth Backend status

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


blwalter at gmail

May 17, 2007, 6:38 AM

Post #1 of 12 (717 views)
Permalink
Question about getting Myth Backend status

Greetings,

I need to write a program/script that will reboot the backend whenever
it is not 1) recording and 2) nothing is active in the job queue.

Is there a module/script/?? that will return this, or, what values from
the DB do I query to find this information out?

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


mtdean at thirdcontact

May 17, 2007, 6:43 AM

Post #2 of 12 (692 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

On 05/17/2007 09:38 AM, Brian Walter wrote:
> I need to write a program/script that will reboot the backend whenever
> it is not 1) recording and 2) nothing is active in the job queue.
>
> Is there a module/script/?? that will return this, or, what values from
> the DB do I query to find this information out?

wget 'http://mythhostname:6544/xml'

If it's a "use every once in a while" script. For regularly shutting
down or whatever, check out mythwelcome and mythshutdown.

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


blwalter at gmail

May 17, 2007, 6:55 AM

Post #3 of 12 (688 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

Michael T. Dean wrote:
> On 05/17/2007 09:38 AM, Brian Walter wrote:
>
>> I need to write a program/script that will reboot the backend whenever
>> it is not 1) recording and 2) nothing is active in the job queue.
>>
>> Is there a module/script/?? that will return this, or, what values from
>> the DB do I query to find this information out?
>>
>
> wget 'http://mythhostname:6544/xml'
>
> If it's a "use every once in a while" script. For regularly shutting
> down or whatever, check out mythwelcome and mythshutdown.
>
> Mike
> _______________________________________________
>
Thanks Mike!

For now, it's gonna be a once an hour check and if not busy, reboot.

MythWelcome is a frontend gui, right?

MythShutdown looks like the solution - basically returns a status code
if anything is going on.

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


melunko at gmail

May 17, 2007, 6:56 AM

Post #4 of 12 (690 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

Hi,

gmyth library could help. But another way could be the mythtv html interface
that you could use to query an xml file describing the enconding status and
the jobqueue count.

Open this file in your browser:
trunk/mythtv/contrib/MythXMLTest/index.html, and you will know what to do.
If you want to add this features at gmyth, we will accept your patch :).



On 5/17/07, Brian Walter <blwalter [at] gmail> wrote:
>
> Greetings,
>
> I need to write a program/script that will reboot the backend whenever
> it is not 1) recording and 2) nothing is active in the job queue.
>
> Is there a module/script/?? that will return this, or, what values from
> the DB do I query to find this information out?
>
> TIA
> Brian
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


jack at webhouse

May 17, 2007, 7:00 AM

Post #5 of 12 (690 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

On Thu, 2007-05-17 at 09:55 -0400, Brian Walter wrote:
> Michael T. Dean wrote:
> > On 05/17/2007 09:38 AM, Brian Walter wrote:
> >
> >> I need to write a program/script that will reboot the backend whenever
> >> it is not 1) recording and 2) nothing is active in the job queue.
> >>
> >> Is there a module/script/?? that will return this, or, what values from
> >> the DB do I query to find this information out?
> >>
> >
> > wget 'http://mythhostname:6544/xml'
> >
> > If it's a "use every once in a while" script. For regularly shutting
> > down or whatever, check out mythwelcome and mythshutdown.
> >
> > Mike
> > _______________________________________________
> >
> Thanks Mike!
>
> For now, it's gonna be a once an hour check and if not busy, reboot.

Just out of curiosity, why?

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


blwalter at gmail

May 17, 2007, 7:12 AM

Post #6 of 12 (693 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

Jack Madison wrote:
> On Thu, 2007-05-17 at 09:55 -0400, Brian Walter wrote:
>
>> Michael T. Dean wrote:
>>
>>> On 05/17/2007 09:38 AM, Brian Walter wrote:
>>>
>>>
>>>> I need to write a program/script that will reboot the backend whenever
>>>> it is not 1) recording and 2) nothing is active in the job queue.
>>>>
>>>> Is there a module/script/?? that will return this, or, what values from
>>>> the DB do I query to find this information out?
>>>>
>>>>
>>> wget 'http://mythhostname:6544/xml'
>>>
>>> If it's a "use every once in a while" script. For regularly shutting
>>> down or whatever, check out mythwelcome and mythshutdown.
>>>
>>> Mike
>>> _______________________________________________
>>>
>>>
>> Thanks Mike!
>>
>> For now, it's gonna be a once an hour check and if not busy, reboot.
>>
>
> Just out of curiosity, why?
>
>
I have 1 PVR-500 and 1 PVR-150 (along with a couple of HDHR's). There
is a known issue with ivtv corrupting the system clock. When all three
devices on the PVR's are recording, I'll start getting DMA
problems...then eventually, driver stops responding and everything comes
to a crashing halt, and the only solution is to reboot. Once you start
getting the DMA errors though, it seems to be progressive - I might not
have an issue right away, but, eventually, it'll lead to the
aforementioned result.

Also, there's something going on with the IRQ in ivtv that causes severe
system clock drift. This morning, the system clock was off by 30
MINUTES (adds to wife annoyance factor when shows are skewed).. ntpd
had thrown up it's hands and said 'You fix it..I'm giving up'. I've
tried adjtimex -a...with limited success. At this point, I feel most
comfortable just rebooting when the system is idle.

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


blwalter at gmail

May 17, 2007, 8:46 AM

Post #7 of 12 (693 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

Michael T. Dean wrote:
> On 05/17/2007 09:38 AM, Brian Walter wrote:
>
>> I need to write a program/script that will reboot the backend whenever
>> it is not 1) recording and 2) nothing is active in the job queue.
>>
>> Is there a module/script/?? that will return this, or, what values from
>> the DB do I query to find this information out?
>>
>
> wget 'http://mythhostname:6544/xml'
>
> If it's a "use every once in a while" script. For regularly shutting
> down or whatever, check out mythwelcome and mythshutdown.
>
> Mike
>
Turns out, mythshutdown does not check to see if recording? Upon
looking in the source, it only appears to check for spawned processes.
Is there a flag that I'm missing to also have it check for if the
recorder(s) is busy?

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


devel at mrwire

May 17, 2007, 9:24 AM

Post #8 of 12 (685 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

>Turns out, mythshutdown does not check to see if recording? Upon
>looking in the source, it only appears to check for spawned processes.
>Is there a flag that I'm missing to also have it check for if the
>recorder(s) is busy?

It does with SVN head. mythshutdown --status will return 8 if there is a recording in progress
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


blwalter at gmail

May 17, 2007, 9:36 AM

Post #9 of 12 (686 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

devel [at] mrwire wrote:
>> Turns out, mythshutdown does not check to see if recording? Upon
>> looking in the source, it only appears to check for spawned processes.
>> Is there a flag that I'm missing to also have it check for if the
>> recorder(s) is busy?
>>
>
> It does with SVN head. mythshutdown --status will return 8 if there is a recording in progress
> _______________________________________________
>
ahhh! Thanks!. Is it 'safe' to try just mythshutdown from SVN head
with 20-fixes?

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


mythtv at dsl

May 17, 2007, 10:15 AM

Post #10 of 12 (687 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

Brian Walter wrote:
> Turns out, mythshutdown does not check to see if recording? Upon
> looking in the source, it only appears to check for spawned processes.
> Is there a flag that I'm missing to also have it check for if the
> recorder(s) is busy?
>
> Brian
>
>

What version of Myth are you using? MythShutdown from svn trunk will
check recording status.

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


blwalter at gmail

May 17, 2007, 10:48 AM

Post #11 of 12 (690 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

Paul Harrison wrote:
> Brian Walter wrote:
>
>> Turns out, mythshutdown does not check to see if recording? Upon
>> looking in the source, it only appears to check for spawned processes.
>> Is there a flag that I'm missing to also have it check for if the
>> recorder(s) is busy?
>>
>> Brian
>>
>>
>>
>
> What version of Myth are you using? MythShutdown from svn trunk will
> check recording status.
>
> Paul H.
>
Actually, I think I found an easier solution for a quick and dirty:

select count(*) from inuseprograms -> if nonzero something is recording
or in queue
select count(*) from jobqueue where status = 4 -> if nonzero, something
being flagged

I'm not using transcode at the moment..so..this, I think, should handle
the problem till ivtv gets fixed.

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


mtdean at thirdcontact

May 17, 2007, 11:11 AM

Post #12 of 12 (684 views)
Permalink
Re: Question about getting Myth Backend status [In reply to]

On 05/17/2007 12:36 PM, Brian Walter wrote:
> devel [at] mrwire wrote:
>
>>> Turns out, mythshutdown does not check to see if recording? Upon
>>> looking in the source, it only appears to check for spawned processes.
>>> Is there a flag that I'm missing to also have it check for if the
>>> recorder(s) is busy?
>> It does with SVN head. mythshutdown --status will return 8 if there is a recording in progress
> ahhh! Thanks!. Is it 'safe' to try just mythshutdown from SVN head
> with 20-fixes?

Nope. All or nothing.

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

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.