View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 46 posts ] 
Go to page Previous  1, 2, 3, 4  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Sun Mar 30, 2008 5:55 pm 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
I realize the potential recordings don't matter, so ignore what I said. Still, upcoming recordings doesn't seem to agree with the time that idle script looks for. For example, when I ran the script at 7:20 it said I had an upcoming recording. This recording is set for 8pm so it shouldn't have been effected. Here's the head of my schedule.

Code:
Title - Subtitle                    Chan ChID Day Start  End   C I  T N   Pri
The Simpsons - "Smoke on the Daught    2 1002  30 20:00-20:30  1 1  C 1   0/0
MythBusters - "Exploding Pants"       29 1029  30 20:00-21:00  0 0  C r   0/0
24 - "Day 6: 8:00AM - 9:00AM"         65 1065  30 20:00-21:00  0 0  A r   0/0
Family Guy - "Peter's Daughter"        2 1002  30 21:00-21:30  0 0  C r   0/0
MythBusters - "Confederate Steam Gu   29 1029  30 21:00-22:00  0 0  C P   0/0
South Park - "Major Boobage"          25 1025  30 23:00-23:30  0 0  A P   0/0
24 - "Day 6: 8:00AM - 9:00AM"         65 1065  30 23:00-00:00  0 0  A r   0/0
MythBusters - "Exploding Pants"       29 1029  31 00:00-01:00  0 0  C r   0/0
MythBusters - "Confederate Steam Gu   29 1029  31 01:00-02:00  0 0  C P   0/0
South Park - "Major Boobage"          25 1025  31 02:00-02:30  0 0  A P   0/0
How It's Made                         31 1031  31 02:00-02:30  1 1  d 1  -1/0
How It's Made                         31 1031  31 02:30-03:00  0 0  d L  -1/0
How It's Made                         29 1029  31 09:00-09:30  0 0  d E  -1/0
The Daily Show With Jon Stewart       25 1025  31 10:00-10:30  0 0  C P  -1/0
How It's Made                         29 1029  31 12:00-12:30  0 0  d E  -1/0
The Daily Show With Jon Stewart       25 1025  31 14:00-14:30  0 0  C P  -1/0
Scrubs - "My Deja Vu My Deja Vu"      25 1025  31 15:00-15:32  0 0  A r   2/0
Scrubs - "My Urologist"               25 1025  31 15:30-16:02  0 0  A r   2/0


As you can see anything with " 1 1" under " C I " (whatever that is), should be recorded. But the timescale still doesn't make sense.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 5:58 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
What is the count it's telling you?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 6:00 pm 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
Ran at 7:58 so it shouldn't get the upcoming recording.

Code:
 ./idle.sh -t 1
Checking what MythTV is doing now or plans within 1 minutes...

mythshutdown returned 0
schemalock 0
running jobs 0
inuse programs 0
potential recordings 5
planned recordings 1

System is busy


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 6:10 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
What does this sequence of commands return?
Code:
TIME_BEFORE=1
TIME_AFTER=5
mysql -u root mythconverg -sBe "select p.starttime, p.endtime, p.title
  from recordmatch as rm, program as p
  where rm.chanid = p.chanid and rm.starttime = p.starttime
  and rm.starttime < now() + interval $TIME_BEFORE minute
  and now() < p.endtime + interval $TIME_AFTER minute"

Sorry for the slow reply I'm in the middle of making dinner.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 6:32 pm 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
Returns this:

Code:
mysql -u root mythconverg -sBe "select p.starttime, p.endtime, p.title from recordmatch as rm, program as p where rm.chanid = p.chanid and rm.starttime = p.starttime and rm.starttime < now() + interval $TIME_BEFORE minute and now() < p.endtime + interval $TIME_AFTER minute"
starttime       endtime title
2008-03-30 20:00:00     2008-03-30 20:30:00     The Simpsons
2008-03-30 20:00:00     2008-03-30 21:00:00     24
2008-03-30 20:00:00     2008-03-30 21:00:00     MythBusters


24 and MythBusters shouldn't be set to record at all.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 6:44 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
How about:
Code:
    mythbackend --printsched 2>&1 |
      awk -v upcoming=$UPCOMING '
        BEGIN {item=-1}
        /--- print list start ---/,/---  print list end  ---/ {
            if (item>0 && item<=upcoming) print $0;
            item += 1;
        }'

The results from the DB query are the potentials. We then look at the first N from the --printsched output for ones with card assignments.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 6:48 pm 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
It returns nothing now that the 8-8:30 pm show is out of the way. I'll have to test it again when I near a new scheduled recording tomorrow.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 7:10 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
I'll upload a version with additional debugging output to the wiki shortly.

Remember that the window in the DB query includes shows which are up to 5 minutes in the past. This is one of the ways that the query and the BE can disagree. You can adjust the setting based on your typical bracketing.

OK, here is the link... idle.sh Use the new -v option to make it list the recordings it thinks are candidates.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 11, 2008 9:51 am 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
I have a question regarding how idle.sh plays with mythwelcome. I have just setup the acpi startup/shutdown with mythwelcome to turn my frontend on at 6:30 am daily and not allow it to shut off automatically until 9:00 pm. During that period, the idle.sh script will return:

Code:
Checking what MythTV is doing now or plans within 20 minutes...

mythshutdown returned 64
schemalock 0
running jobs 0
inuse programs 0
potential recordings 0
planned recordings 0

System is busy


Here are the mythshutdown status codes:

Code:
         0 - Idle
         1 - Transcoding
         2 - Commercial Flagging
         4 - Grabbing EPG data
         8 - Not used
        16 - Locked
        32 - Not used
        64 - In a daily wakeup/shutdown period
       128 - Less than 15 minutes to next wakeup period


Is there any reason why the system should be considered "busy" (for the purposes of mythbackup & optimize_db) if it is simply in a daily wakeup/shutdown period?

I suppose my alternative would be to shorten the daily wakeup/shutdown period and manually start the frontend so it doesn't shutdown until night time... Any input?


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 11, 2008 10:21 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
knappster wrote:
Is there any reason why the system should be considered "busy" (for the purposes of mythbackup & optimize_db) if it is simply in a daily wakeup/shutdown period?

Probably not. I have to plead cryptic messages and poor documentation on this one. It wasn't obvious to me that "daily wakeup/shutdown period" meant planned uptime. The list from 0.21 says:
Code:
                          0 - Idle
                          1 - Transcoding
                          2 - Commercial Flagging
                          4 - Grabbing EPG data
                          8 - Recording - only valid if flag is 1
                         16 - Locked
                         32 - Jobs running or pending
                         64 - In a daily wakeup/shutdown period
                        128 - Less than 15 minutes to next wakeup period
                        255 - Setup is running

So we can't just use a simple test... Let me think on this. I'll try to get back to you with a patch shortly...


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 11, 2008 10:31 am 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
You can wait until the upgrade to 5.5. I don't want you to have to do this twice. And as you said, there is little documentation on it. Does it prioritize the code's so that if there was a 64 and a 2 that it would show the 2 and not the 64? Perhaps some more information on mythshutdown is in order.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 11, 2008 10:40 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Actually this is a simple one line patch... Right after the lines (near line 44) that say:
Code:
/usr/bin/mythshutdown -s 1
busy="$?"
msg "mythshutdown returned $busy"

Add the following. The comment is optional. ;-)
Code:
# Ignore certain non-zero flag values
busy=$(($busy & 0x2F))


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 11, 2008 7:34 pm 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
Thanks, I'll give it a shot!


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 14, 2008 10:08 pm 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
Just thought I'd follow up.

I just the idle.sh script while running mythfilldatabase during a wakeup/shutdown period and it read 68 about 10 times in a row, so mythshutdown must prioritize the the status if it is during that wakeup/shutdown period. It read 64 before and after. The new script seems to fix my problem. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 14, 2008 10:57 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Well 68 is 64 (In a daily wakeup/shutdown period) + 4 (Grabbing EPG data). The patch uses a bit mask to separate these so that seems to be working correctly...


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ] 
Go to page Previous  1, 2, 3, 4  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu