[mythtv-users] channel changes via script suddenly stopped working--diagnose help

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Apr 13 16:05:50 UTC 2013


On Sat, 13 Apr 2013 11:27:57 -0400, you wrote:

>On 4/13/2013 11:25 AM, Bill Meek wrote:
>> On 04/13/2013 10:08 AM, Larry Roberts wrote:
>>> So about a week or so ago my recordings all started occurring on the 
>>> same channel regardless of what channel they should have been 
>>> recorded on.
>>> I have been using an IRBlaster along with a channel changing script 
>>> successfully for well over a year and then out of the blue with no known
>>> changes this started.
>>>
>>> I have went into mythtv-setup and verified that the script is still 
>>> referenced and the default channel is still there.
>>>
>>> I have also ran a check against the databases to verify no corruption 
>>> there as well.
>>>
>>> I can manually run the cc.sh script just fine and it will tune the 
>>> output but for some reason mythtv is just not using the script now.
>>>
>>> I really have no idea how to diagnose what is going on in mythtv and 
>>> the script.
>>
>> Hi;
>>
>> On your running backend, type: mythbackend --setverbose system
>>
>> Then tailf your backend log and schedule a recording.
>>
>> You should see the cc.sh command as it's executed. Use --setverbose
>> general to restore normal logging.
>>
>Great minds think alike :)  I found a post with a similar problem. Here  
>is the output
>
>2013-04-13 11:22:14.050929 I [1795/1910] TVRecEvent system-unix.cpp:868 
>(Fork) - Managed child (PID: 2481) has started! *& 
>command=/usr/local/bin/cc.sh 18, timeout=0
>
>
>SO I see that it has attempted to change the channel but for some reason 
>its not happening.  I know the script works as I can run it manually 
>just fine and it will tune.
>
>Do you happen to know what the timeout=0 value implies?

A timeout value of 0 is commonly used in programming to mean no
timeout.  But I do not know for sure if that is what is meant here.

Perhaps there is a permissions problem, and the attempt to call cc.sh
fails.  What user is mythbackend run from?  Is it the same user or the
same group as the user where manually running cc.sh works?

You could put some debug code in cc.sh to output to a log file every
time it is called.  Then you can see if the call from mythbackend
actually managed to call it.  For example:

echo `date` "$@" >>\var\log\mythtv\cc.sh.log

Make sure that \var\log\mythtv\cc.sh.log is world writable:

touch \var\log\mythtv\cc.sh.log
chmod a+rw \var\log\mythtv\cc.sh.log

otherwise the writes to the log file might fail.


More information about the mythtv-users mailing list