[mythtv-users] Auto-shutdown and EPG data
linux at johannes-niess.de
Sun Mar 28 07:11:16 EST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Am Sonntag, 28. März 2004 11:34 schrieb Henk Poley:
> Op zondag 28 maart 2004 11:42, schreef Johannes Niess:
> > Am Samstag, 27. März 2004 15:58 schrieb Henk Poley:
> > > Op zaterdag 27 maart 2004 15:44, schreef Timo Boettcher:
> > > > * Henk Poley <hpoley at dds.nl>, Saturday, March 27, 2004, 2:55:22 PM:
> > > > > I've ran MythTV with automatic shutdown (after all frontends are
> > > > > disconnected and nothing is recording) for some time noe. But I
> > > > > always updated the EPG by hand. Setting a cron job wouldn't really
> > > > > help since you don't know is the machine will be on by then. Now I
> > > > > figured that others will have the same problem, so have have you
> > > > > solved it?
> > > >
> > > > IIRC Redhat had a special crondaemon named anacron (asyncronous cron)
> > > > which was able to find out when a cron-job was last executed and
> > > > would then execute it again if it was overdue. It looks like the
> > > > vcron/vixie-cron (as installed by gentoo) can do it as well, but I
> > > > didn't try.
> > > > OTOH, you can write a small script that does something like that:
> > > > <snip>
> > >
> > > Hmm, I figured that yes, but as far as I can tell the HD access of the
> > > grabber and database-insertion can interfere with the recording. As
> > > since vixie-cron (yes, running Gentoo) will most likely schedule it
> > > somewhere after boottime.
> > Using "batch" should improve the situation. It starts jobs only if the
> > load is below a limit. due to the threaded nature of mythtv I get loads
> > of about 2 and CPU usage of 40% (P4 2.4 GHz, full PAL, bttv card).
> > "batch" needs a load < 0.8 by default to run the script. As "batch" comes
> > with "atd" it should be on your box.
> Hmm, interesting, but it doesn't seem to be installed (on my 'other' Gentoo
> system, not used as MythTV backend). How should I invoke it? I've currently
> just symlinked the cron job (somewhere in /usr/share/mythtv/)
> in /etc/cron.daily/.
echo scriptname | batch
Personally I use nxtvepg-2.7.0pre4. It plays nicely with mythtv, stopping
acquisition if the tuner is used. A cron job does a dump to xmltv format. No
hassle with websites changing or locking out xmltv.
> > It will not detect recordings that start during mythfilldatabase.
> Well off coarse. Though I've seen a program that will 'stop' (not kill) a
> program when CPU load get's above some level, and resume it when the system
> is idle again. Too bad I don't remember where I seen it.
> Don't know how good that will work with a networked application like XMLTV
Basically you could "kill -STOP <pid>" and "kill -CONT <pid>". But a 2h show
and a stop that long could be seen as a time out somewhere. So "kill -HUP
<pid>" and a restart of the script later on might be better.
I doubt that this is worth it.
> btw, I guess there's no way to get the MythTV scheduler to know that you
> want it to start the machine at least once a day?
You could insert it into the shutdown script of mythtv and set the "remain
powered time" accordingly. Combine that with a timestamp file and it starts
just once a day.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the mythtv-users