Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

"Forgets" to check for idle mode so auto-shutdown not working

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


philledwards at gmail

Sep 13, 2005, 1:48 AM

Post #1 of 4 (1282 views)
Permalink
"Forgets" to check for idle mode so auto-shutdown not working

My auto-shutdown used to work like a charm. Not sure what changed
along the way but what happens now is that if Myth has been running
for a few hours the logs don't show "I'm idle now... shutdown will
occur in 120 seconds" etc unless I restart mythbackend. It's almost as
if during normal running it's forgetting to check for being idle and
only a restart of mythbackend will fix it. As soon as I do a restart
it detects stratight away that it's idle and goes into the normal
auto-shutdown process.

Has anyone else noticed this, and is there a fix for it? I'm on
0.18.1, FC3, binary ATRPMs.

Alternatively, I could write a dirty work-around cron script that does
the mythbackend restart every hour if it's not recording anything.
Does anyone have an easy shell-script check to see if it's recording?
Also, if it's transcoding or commercial flagging or
mythfilldatabase'ing and mythbackend gets restarted does that mess
stuff up?

Regards,
Phill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mythtv at dsl

Sep 13, 2005, 5:58 AM

Post #2 of 4 (1224 views)
Permalink
Re: "Forgets" to check for idle mode so auto-shutdownnot working [In reply to]

----- Original Message -----
From: "Phill Edwards" <philledwards [at] gmail>
To: "MythTV Users List" <mythtv-users [at] mythtv>
Sent: Tuesday, September 13, 2005 9:48 AM
Subject: [mythtv-users] "Forgets" to check for idle mode so auto-shutdownnot working


>My auto-shutdown used to work like a charm. Not sure what changed
>along the way but what happens now is that if Myth has been running
>for a few hours the logs don't show "I'm idle now... shutdown will
>occur in 120 seconds" etc unless I restart mythbackend. It's almost as
>if during normal running it's forgetting to check for being idle and
>only a restart of mythbackend will fix it. As soon as I do a restart
>it detects stratight away that it's idle and goes into the normal
>auto-shutdown process.

>Has anyone else noticed this, and is there a fix for it? I'm on
>0.18.1, FC3, binary ATRPMs.

>Alternatively, I could write a dirty work-around cron script that does
>the mythbackend restart every hour if it's not recording anything.
>Does anyone have an easy shell-script check to see if it's recording?
>Also, if it's transcoding or commercial flagging or
>mythfilldatabase'ing and mythbackend gets restarted does that mess
>stuff up?

>Regards,
>Phill

I have seen this myself when testing a shutdown script. I think the
problem is that when the backend calls the 'ServerHaltCommand' script/program
and it fails to shutdown for some reason the backend them gets into a
state where it doesn't try to shutdown again. I don't see the problem
during normal operation only when something fails in the shutdown script.

Are you sure the 'Server Halt Command' you have set is working properly?

Paul

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


knowledgejunkie at gmail

Sep 13, 2005, 12:52 PM

Post #3 of 4 (1227 views)
Permalink
Re: "Forgets" to check for idle mode so auto-shutdown not working [In reply to]

On 13/09/05, Phill Edwards <philledwards [at] gmail> wrote:
> My auto-shutdown used to work like a charm. Not sure what changed
> along the way but what happens now is that if Myth has been running
> for a few hours the logs don't show "I'm idle now... shutdown will
> occur in 120 seconds" etc unless I restart mythbackend. It's almost as
> if during normal running it's forgetting to check for being idle and
> only a restart of mythbackend will fix it. As soon as I do a restart
> it detects stratight away that it's idle and goes into the normal
> auto-shutdown process.
>
> Has anyone else noticed this, and is there a fix for it? I'm on
> 0.18.1, FC3, binary ATRPMs.

I posted on a similar topic yesterday. My backend normally wakes up
and turns off with no problems. Sometimes (recently on Sunday) the
machine was getting idle (per the logs) and then counting down to
zero. However, the script was not being run so the machine stayed on
all night. Restarting the backend fixed the problem. Running 0.18.1 on
FC2.

Another problem I see is if a frontend is removed without either
killing the frontend process or exiting normally (observed this whilst
testing the wireless on my notebook), the backend does not have a
mechanism to remove the client, which then seemed to stop it
reconnecting.

Nick
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


philledwards at gmail

Sep 21, 2005, 4:45 AM

Post #4 of 4 (1207 views)
Permalink
Re: "Forgets" to check for idle mode so auto-shutdownnot working [In reply to]

> Yes, I'm pretty sure it's working. My shutdown script checks that
> nothing else is running (such as mythcommflag or mythtranscode) before
> it allows shutdown. If something is running it exists with status 1.
> Are you saying that the backend then treats that as some sort of error
> condition which prevents it from checking for auto-shutdown again? It
> certainly never used to do that, and I would say that is not really
> ideal as it takes control away from users writing scripts like this.
> Without it the automatic shutdown will go ahead even if transcoding or
> commflagging is happening which is not good.
>
> Does anyone have any suggestions about how to handle this?

I have now put in a work-around for this on my system. I have a shell
script which runs hourly which checks to see if there are any
important programs running. If there aren't then it restarts
mythbackend which will then make it do its auto-shutdown checking
again when the time is right. I've attached the shell scripts if
anyone is interested:

functions.sh - contains functions to check if recording or
anything important running
mythbackend_restart.sh - restarts mythbackend service if all OK

Regards,
Phill
Attachments: functions.sh (1.64 KB)
  mythbackend_restart.sh (1.49 KB)

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.