[mythtv] Commercial flagging, shutdowns & lost recordings
matthew_carle at hotmail.com
Sun Feb 5 03:54:47 UTC 2006
> -----Original Message-----
> From: mythtv-dev-bounces at mythtv.org
> [mailto:mythtv-dev-bounces at mythtv.org] On Behalf Of Paul Harrison
> Sent: Saturday, 4 February 2006 9:42 PM
> To: Development of mythtv
> Subject: Re: [mythtv] Commercial flagging, shutdowns & lost recordings
> ----- Original Message -----
> From: "Matthew Carle" <matthew_carle at hotmail.com>
> To: <mythtv-dev at mythtv.org>
> Sent: Friday, February 03, 2006 8:43 AM
> Subject: [mythtv] Commercial flagging, shutdowns & lost recordings
> >I posted this in the mythtv-users list but didn't get a
> reply. This is in
> >This is a problem I noticed a while ago but it has happened
> to me twice in
> >the last couple of weeks. It seems like it would affect most
> people who use
> >commercial flagging and have their backend set to shutdown
> when inactive.
> >At the end of a recording, the system prepares to shutdown.
> >flagging starts but doesn't interrupt the shutdown process.
> I see this sort
> >of thing in the log:
> >2006-01-22 23:20:03.151 I'm idle now... shutdown will occur
> in 240 seconds.
> >2006-01-22 23:20:12.170 230 secs left to system shutdown!
> >2006-01-22 23:20:22.192 220 secs left to system shutdown!
> >2006-01-22 23:20:32.213 210 secs left to system shutdown!
> >2006-01-22 23:20:40.120 Starting Commercial Flagging for
> "Out of Sight"
> >recorded from channel 1015 at Sun Jan 22 20:24:00 2006.
> >2006-01-22 23:20:41.118 New DB connection, total: 1
> >2006-01-22 23:20:41.166 New DB connection, total: 2
> >2006-01-22 23:20:42.233 200 secs left to system shutdown!
> >2006-01-22 23:20:52.256 190 secs left to system shutdown!
> >When the countdown has finished, it appears to decide to wait for the
> >commercial flagging to finish. So more than an hour later,
> we get this:
> >2006-01-23 00:33:55.566 Finished, 5 break(s) found.
> >nvram-wakeup: Do NOT write into nvram. Wake Up time must be
> >nvram-wakeup: at least 10 minutes in the future.
> >There was actually a recording scheduled to start at about
> this time, but it
> >shut down anyway. Additionally, because nvram-wakeup didn't
> write to the
> >bios (the next wakeup must be at least 10 minutes in the
> future), it won't
> >wake up for any future recordings - you have to manually
> power it up after
> >one of these occurrences. This could cause the loss of many
> recordings if
> >the mythtv box isn't used for a longer period. I have also
> had it do what
> >seems like a similar thing while I was watching a recorded
> show. Does this
> >happen to anyone else? Has it been fixed in 0.19?
> You can prevent the backend shutting down when it is busy commercial
> flagging by adding a script to the "Pre shutdown check command" in the
> backend settings. It should check to see if the
> 'mythcommflag' process is
> running and return the appropriate value which prevents the
> backend starting
> its shutdown sequence.
> In 0.19 there is an helper program 'mythshutdown' which can,
> among other
> things, check to see if mythcommflag, mythfilldatabase or
> mythtranscode is
> running. All you need to do is change the 'Pre shutdown check
> command' to
> 'mythshutdown --check'.
> There are more details in the README about mythshutdown and
> also mythwelcome
> which may also interest you if you don't want to leave your
> system running 24/7.
> Paul H.
It sounds like that should stop the problem. Does the 'Pre shutdown check
command' continue to run while waiting for shutdown (eg every 10 secs) or
does it just run either when first idle or when starting the shutdown?
The current behaviour still seems quite strange to me. I can't see why it
doesn't already abort the shutdown count down if a commflag or transcode is
running (and yet it seems to abort shutdown at the last minute - but not
restart the countdown). Maybe there is something I am missing.
I had a read about mythwelcome/mythshutdown. Am I correct in thinking that
mythshutdown just manages nvram-wakeup and the system shutdown -
(mythbackend still checks to see if the system is idle)?
I look forward to being able to use 'mythshutdown --check' in 0.19 -
hopefully it's not too long away now.
More information about the mythtv-dev