[mythtv-users] What Tuner Did a Recording Come From?
mikep at randomtraveller.org.uk
Sat Sep 10 17:03:28 UTC 2011
On 10/09/11 13:14, Ronald Frazier wrote:
> On Sat, Sep 10, 2011 at 6:38 AM, Dan<dansto.well+myth at gmail.com> wrote:
>> Yes! It would be useful. I'm currently trying to diagnose tuning
>> issues in a two-tuner machine, and work out if the (intermittent)
>> problem is happening one or both of the inputs.
>> It doesn't matter that the information might become outdated; it'd be
>> very useful in the short term.
> Well, you can always grep the log once a day (after logrotate runs,
> assuming you've got it setup), and store the output to a file:
> zcat /var/log/mythtv/oldlogs/mythbackend.log.1.gz | grep 'Started
> recording'>> /tmp/recorder_history
> This assumes you have lograte set to compress you old logfiles. If
> not, then change it from zcat to cat. Also change the path for the old
> logfile, and the path of the recorder_history file to wherever you
> want to keep it.
> If you want to keep it updated during the day, so that you don't have
> to wait until the next day to look at it, you can always run this
> multiple times per day against the current log file. If you do this,
> you will see recordings show up multiple times. To clean up the file,
> just run
> cat /tmp/recorder_history | sort | uniq> /tmp/recorder_history2; mv
> /tmp/recorder_history2 /tmp/recorder_history
> If you want a prettier way to view this, you can always change that
> mythweb script mike linked to so that it gets the data from this file
> instead of directly from the logs. You'll just have to be careful,
> because as the size of this file grows you will get more and more data
> showing up in mythweb, and that status page will take longer and
> longer to load as time goes on. So you may want to change the script
> so that it only looks at the last 1000 lines of the file (or whatever
> number gives you acceptable performance).
...and this is supposed to be easier than added an extra column to the database,
which I can check with mysqlquery or phpmysql?
"Keeping it updated during the day"? That's what the database is for.
More information about the mythtv-users