[mythtv-users] coordinating Myth and OS-admin functions

Jerome Yuzyk jerome at supernet.ab.ca
Sat Sep 13 02:03:13 UTC 2008


[I am using Myth 0.21 on Fedora 7 so if any of this is solved in the latest 
release then "D" or whatever.]


After reading the thread about rebuilding seektables I went over to the Wiki 
to read about the optimize_mythdb.pl script and it cautions that the backed 
should be inactive while the database is being touched. I have been running 
it in a cron job for over a year and I haven't had problems but.... 

Then I got to thinking about all the other tasks I have going on my FE/BE 
machine. Especially now since I got a larger drive, which means I am 
recording more. I see sometimes errors in my logs around about when my 
morning rsync is going so I know there are some collisions happening. I went 
looking for some kind of "back-off" mechanism for my machine-maintenance 
scripts.

I checked into mythshutdown but either I don't understand how to use it, or it 
doesn't work for me. Along my Googling way I came across a script called 
idle.sh for KnoppMyth but it didn't do anything for me either. I was a bit 
out of stem by then, I admit.

I'm probably not the only one in this position. What do you folks do to keep 
the Linux tasks on your machines from bouncing into Myth tasks?

I have several outside-Myth tasks in my crontab:

  - the standard Fedora daily/weekly/monthly jobs
    . logwatch
    . logrotate
    . mlocate 
    . others that are pretty unintrusive

  - weekly optimize_mythdb.pl

  - weekly rsync system and ~mythtv files (after ZIPping up the database)

The Myth backend has several "sensitive" processes of its own, each one 
touching the database:

  - recording
  - mythcommflag
  - mythtranscode
  - housekeeping

I spent a non-trivial amount of time, though a little bleary-eyed, reading 
around last night and I don't see much discussion of this except as it 
pertains to getting the wake-up side of mythshutdown working. There wasn't 
any discussion I could find about how to interoperate all the 
externally-driven maintenance things with a running backend - there's plenty 
of how-to for doing individual tasks, but I guess I was looking for that next 
step. Is there nothing to worry about in doing these operations?

Even the 0.22 optimize_mythdb.pl makes no mention of the sensitivity of its 
operations nor provides a way to only proceed if it's safe - it just says put 
it into crontab to run it once a day. That has to be risky to a backend doing 
24/7 recording like mine, No? None of the other scripts in the 0.22 contrib/ 
seem to acknowledge that there may be a live database operating, doing 
transactions.

OK this is long enough. Hope I don't rankle anyone, just some observations and 
questions from an ersatz sysadmin trying to make my MythTV more 
appliance-like.


More information about the mythtv-users mailing list