[mythtv-users] mythfilldatabase tip - random start time

Jarod C. Wilson jcw at wilsonet.com
Tue Feb 10 21:05:42 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 10 February 2004 12:17, Dan Berger wrote:
> Great tip. Noone responded so instead of responding directly to David, I'll
> respond to the whole list. Definitely doc worthy.

Doc'd.

> >-----Original Message-----
>
> From: mythtv-users-bounces at mythtv.org
>
> >[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of David Rees
> >Sent: Monday, February 09, 2004 2:56 PM
> >To: mythtv-users at mythtv.org
> >Subject: [mythtv-users] mythfilldatabase tip - random start time
> >
> >Here's a tip for all you guys running mythfilldatabase from
> >cron (which I assume is nearly everyone!).  I imagine that the
> >majority of people use 3am or 4am as the start time to run
> >mythfilldatabase.  With hundreds of us running
> >mythfilldatabase at the same time, it wouldn't take much to
> >slasdot the information feed servers.  I know that zap2it's
> >servers get pretty slow sometimes.
> >
> >It's easy to randomize the start time, here's what I use in my crontab:
> >
> >0 3 * * * sleep $(expr $RANDOM \% 7200) && \
> >    mythfilldatabase > /var/log/mythtv/mythfilldatabase.log 2>&1
> >
> >Now before running it will sleep a random amount of time
> >between 0 and 7200 seconds before running mythfilldatabase.
> >Might not be a bad idea to increase the range to 10000
> >seconds, but I figure some randomization is better than none.
> >
> >Notice I also redirect the output from mythfilldatabase to a
> >log file, make sure that the file is writable by the user
> >you're running mythfilldatabase as.  This can be handy in case
> >you need to troubleshoot any problems running mythfilldatabase.
> >
> >Hope this is useful, I would like to see these tips added to
> >any HOW-TOs out there.

Done. Excellent idea too, I might add. =)

- -- 
Jarod C. Wilson, RHCE

Got a question? Read this first...
     http://catb.org/~esr/faqs/smart-questions.html
MythTV, Fedora Core & ATrpms documentation:
     http://wilsonet.com/mythtv/
MythTV Searchable Mailing List Archive
     http://www.gossamer-threads.com/archive/MythTV_C2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAKY32ln8CX+oYdJURAhiNAJ4+VKshVAeNICg0rxCG5wjFsLQObgCeOj7w
jjG/9qpc4lEc8vo4sw4W7Zo=
=6Jub
-----END PGP SIGNATURE-----



More information about the mythtv-users mailing list