mvordeme;434519 Wrote: 
> I had been playing music continuously, so there should not have been any
> hibernation at all. There were connection problems with Last.fm at some
> point in time, but unfortunately, they don't appear in the log, so I
> cannot say whether they had anything to do with it. But even if the
> connection problems have triggered the hibernation, it was 13 minutes
> early. My idle timeout is set to 15 minutes but the hibernate action was
> performed only 2 minutes after the last "not idle" action.
> 
> I will step up the log level and listen to some more music.
Remember the the "not idle" action is executed BOTH during music
playback AND during the "is idle" countdown...i.e. your 15 minute idle
time-out.  

We may be getting confused by the nomenclature that I'm using here. 
There are three blocks of time we're concerned with here:  1). Not-idle,
music playing; 2). Is-idle, counting down; 3). Is-idle, countdown
expired.  The not-idle command gets executed every minute during the 1st
two periods, the hibernation command will get executed at the start of
the 3rd period.

So really, the hibernation command ought to fire off ONE minute after
the last "not idle" command.

If you don't mind editing a bit of the SrvrPowerCtrl code, I think we
can improve the debug messages in order to make things a little more
clear in the log.  Make a backup of the Watchdog.pm file and then open
Watchdog.pm in Wordpad and change some lines so that it looks like
this:

Code:
--------------------
    
  ..around line 95:
        if ( Plugins::SrvrPowerCtrl::Block::IsBlocked() || 
Plugins::SrvrPowerCtrl::Util::AnyPlayersPlaying() || 
Plugins::SrvrPowerCtrl::Util::AnyPlayersUpdating() || 
Slim::Music::Import->stillScanning() ) {
                $g{log}->debug("Players are not idle..");
                #Not idle...reset the timer to check again..
                $nIdlePlayersTimeCount = 0;
  
  ..etc.
  
  ..around line 133:
  
        } else {
                $g{log}->debug("Players are idle: " . 
($g{prefs}->nIdleWatchdogTimeout - $nIdlePlayersTimeCount) . " minutes left in 
the idle countdown..");
                if ($g{prefs}->szNotIdleWatchdog_cmd) {
                        
Plugins::SrvrPowerCtrl::Util::SystemExecCmd($g{prefs}->szNotIdleWatchdog_cmd);
  
  ..etc.
  
--------------------


If you go down to line 472, you can make the timer check interval
shorter than one minute so you don't waste so much of your life trying
to debug this.  Set the line:


Code:
--------------------
    
  my $nTimerInterval = 60;              #number of seconds between watchdog 
checks..should be 60.
--------------------


..to:


Code:
--------------------
    
  my $nTimerInterval = 10;
--------------------


So that the idle watchdog gets checked every 10 seconds, rather than
every 60 seconds.  Life is too short.  Those changes ought to yield log
entries like:

Code:
--------------------
    
  [09-06-22 17:22:04.0052] Plugins::SrvrPowerCtrl::Watchdog::IdleWatchdog (139) 
Players are idle: 42 minutes left in the idle countdown..
  [09-06-22 17:22:24.0048] Plugins::SrvrPowerCtrl::Watchdog::IdleWatchdog (139) 
Players are idle: 41 minutes left in the idle countdown..
  [09-06-22 17:22:44.0026] Plugins::SrvrPowerCtrl::Watchdog::IdleWatchdog (96) 
Players are not idle..
  [09-06-22 17:23:04.0030] Plugins::SrvrPowerCtrl::Watchdog::IdleWatchdog (96) 
Players are not idle..
  [09-06-22 17:23:24.0049] Plugins::SrvrPowerCtrl::Watchdog::IdleWatchdog (139) 
Players are idle: 44 minutes left in the idle countdown..
  [09-06-22 17:23:44.0049] Plugins::SrvrPowerCtrl::Watchdog::IdleWatchdog (139) 
Players are idle: 43 minutes left in the idle countdown..
  
--------------------


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to