Home of the Squeezebox™ & Transporter® network music players.
Page 199 of 206 FirstFirst ... 99149189197198199200201 ... LastLast
Results 1,981 to 1,990 of 2059
  1. #1981
    Junior Member
    Join Date
    Apr 2012
    Posts
    4
    Quote Originally Posted by vedri View Post
    Thanks!
    But when i shutdown my computer, server does not get switched to mysqueezebox.com.
    Where to look for the problem?
    EDIT: this is part of my log file:

    [12-03-13 04:56:53.0037] Plugins::SrvrPowerCtrl::Util::CLIExecCmd (810) no name requesting command: no id restartserver
    [12-03-13 04:57:59.0074] Plugins::SrvrPowerCtrl::Util::CLIExecCmd (810) ein requesting command: 00:04:20:1e:69:ef restartserver
    [12-03-13 05:06:35.2862] Plugins::SrvrPowerCtrl::Watchdog::OnWakeupWatchdog (647) Wakeup Call!!
    [12-03-13 15:24:21.0028] Plugins::SrvrPowerCtrl::Util::SystemExecCmd (851) Squeezebox Boom: ein via SrvrPowerCtrl executing command: C:\Windows\system32\cmd.exe /C start /B scpowertool.exe --standby -q --log=C:\ProgramData\Squeezebox\Logs\srvrpowerctrl.l og
    [12-03-13 15:25:42.3882] Plugins::SrvrPowerCtrl::Watchdog::OnWakeupWatchdog (647) Wakeup Call!!
    [12-03-13 15:41:02.0038] Plugins::SrvrPowerCtrl::Watchdog::SleepEndWatchdog (600) SleepEndWatchdog Action: suspend
    [12-03-13 15:41:37.0101] Plugins::SrvrPowerCtrl::Util::SystemExecCmd (851) Squeezebox Boom: ein via SrvrPowerCtrl executing command: C:\Windows\system32\cmd.exe /C start /B scpowertool.exe --standby -q --log=C:\ProgramData\Squeezebox\Logs\srvrpowerctrl.l og
    [12-03-13 17:59:51.4068] Plugins::SrvrPowerCtrl::Watchdog::OnWakeupWatchdog (647) Wakeup Call!!
    [12-03-13 18:35:38.4816] Plugins::SrvrPowerCtrl::AltServer::PushToAltServer (223) No client to push!
    [12-03-13 18:50:57.3912] Plugins::SrvrPowerCtrl::AltServer::PushToAltServer (223) No client to push!
    [12-03-20 20:15:22.1457] Plugins::SrvrPowerCtrl::AltServer::PushToAltServer (223) No client to push!
    [12-03-21 18:00:12.7636] Plugins::SrvrPowerCtrl::AltServer::PushToAltServer (223) No client to push!
    [12-03-23 17:50:54.6636] Plugins::SrvrPowerCtrl::AltServer::PushToAltServer (223) No client to push!
    [12-04-10 21:33:50.0482] Plugins::SrvrPowerCtrl::AltServer::PushToAltServer (223) No client to push!
    [12-04-11 01:45:21.1862] Plugins::SrvrPowerCtrl::Util::SystemExecCmd (851) SrvrPowerCtrl executing command: C:\Windows\system32\cmd.exe /C start /B starthidden.exe scpowertool.exe --wakeup=1334120100 -q --log=C:\ProgramData\Squeezebox\Logs\srvrpowerctrl.l og

  2. #1982
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by Blondie View Post
    i would add a custom idle check command. If i logged in via ssh the server should not go down.
    If i execute
    who | sudo wc -l
    at the shell, the command returns how many users are logged in.
    ...
    Blondie: Your idea was a good one and I'm using it all the time on my own system now. I've extended your custom idle check script to check for samba file locks too. This is still a little experimental. I'll use this for a few days and see how it works.

    spc-checkidle.sh:
    Code:
    #!/bin/sh
    # SrvrPowerCtrl custom idle check script.
    #
    # This returns the number of user log-ins or the number
    # of active samba locks and can be used to prevent
    # SrvrPowerCtrl on-idle actions.
    #
    # Configure SrvrPowerCtrl's "Custom Idle check command" to
    # call this script.
    LOGGING=0
    VERBOSE=0
    LOGFILE=
    DATE=$(/bin/date '+%Y-%m-%d %H:%M:%S')
    SCRIPT=$(basename $0)
    
    CHECKSAMBA=$(which smbd | wc -l)
    USERCOUNT=0
    SAMBALOCKS=0
    
    ####################################################################################
    # Get the log file name..
    #
    get_log_file(){
    	if [ $LOGGING -gt 0 ]; then
    		SLIMLOGDIR=`pgrep -fl 'perl.*squeeze|perl.*slim|perl.*logitech' | sed -n -e 's#^.*--logdir \(.*\)/ .*$#\1#p'`
    		# Punt
    		if ([ -z "$SLIMLOGDIR" ] || [ ! -d "$SLIMLOGDIR" ]); then
    			SLIMLOGDIR='/var/log/squeezeboxserver'
    		fi
    		LOGFILE="${SLIMLOGDIR}/srvrpowerctrl.log"
    	else
    		LOGFILE='/dev/null'
    	fi
    }
    
    ####################################################################################
    # Check for active login sessions..
    #
    check_logins(){
    	USERCOUNT=$(who -u | wc -l)
    }
    
    ####################################################################################
    # Check for active samba file locks..
    #
    check_samba_locks(){
    	SAMBALOCKS=$(smbstatus -L | egrep '^[0-9]* .*$' | wc -l)
    }
    
    log_checks(){
    	echo "${DATE} ${SCRIPT}: Usercount: ${USERCOUNT}, Samba locks: ${SAMBALOCKS}" >> $LOGFILE
    }
    
    disp_checks(){
    	echo "${DATE} ${SCRIPT}: Usercount: ${USERCOUNT}, Samba locks: ${SAMBALOCKS}"
    }
    
    ####################################################################################
    # main()
    #
    
    # Process command line..
    for ARG in $*
    do
    case $ARG in
    	--help)
    		echo "${SCRIPT} [--log] [--verbose]"
    		exit 0
    		;;
    	--log)
    		LOGGING=1
    		;;
    	--verbose)
    		VERBOSE=1
    		;;
    esac
    done
    
    check_logins
    
    if [ $CHECKSAMBA -gt 0 ]; then
    	check_samba_locks
    fi	
    
    if [ $LOGGING -gt 0 ]; then
    	get_log_file
    	log_checks
    fi
    
    if [ $VERBOSE -gt 0 ]; then
    	disp_checks
    fi
    
    exit $(($USERCOUNT+$SAMBALOCKS))
    Edit: updated the script to make the samba checking more comprehensive and not just check for exclusive locks. Now, just having a samba share open in a windows explorer client will trigger a block.
    Last edited by gharris999; 2012-05-25 at 19:33.

  3. #1983
    Senior Member
    Join Date
    Jul 2006
    Location
    UK
    Posts
    231
    Quote Originally Posted by philly4 View Post
    I have my system set up to suspend after 60 min of no activity. After upgrading to 7.7.2, LMS would no longer suspend with no activity. After doing some trouble shooting, I figured out that the Lazy Search plugin was the culprit. After uninstalling Lazy Search, everything works perfectly again. I never had a problem with 7.6 or anything before. Somehow SvrPowerControl was getting info from it that there was activity and therefore not going to suspend. Anyone else run into this issue? Any workarounds? Windows XP SP, 3 LMS 7.7.2 - r33893, Lazy Search v3.5.6. Thanks for any help.
    I have had this too since upgrading to 7.7.2.

    I think it only happens the first time a shutdown occurs after a library rescan.

    Rebooting the PC seems to clear the problem.

  4. #1984
    Senior Member
    Join Date
    Jan 2006
    Location
    South Coast, NSW, Australia
    Posts
    636

    Start of Day function ?

    I have used Server Power Control for years to shut my Squeezebox server down, more recently using the excellent End of Day functions.
    I also use a custom command to increase the data base cache size (cli//PRAGMA%20cache_size%20%3D%20250000) that appears to speed up various browsing functions. The only drawback with this command is that it is manual - I have to remember to execute it as my server wakes up automatically each morning.
    Is there a way of executing a command when the server starts up, in other words a "Start of Day" function ?

    At End of Day I shut down the server rather than hibernate as the server is also used as a TV recorder and the program guide is updated as part of the start up process.
    A camel is a racehorse designed by a committee.

  5. #1985
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by Wirrunna View Post
    I have used Server Power Control for years to shut my Squeezebox server down, more recently using the excellent End of Day functions.
    I also use a custom command to increase the data base cache size (cli//PRAGMA%20cache_size%20%3D%20250000) that appears to speed up various browsing functions. The only drawback with this command is that it is manual - I have to remember to execute it as my server wakes up automatically each morning.
    Is there a way of executing a command when the server starts up, in other words a "Start of Day" function ?

    At End of Day I shut down the server rather than hibernate as the server is also used as a TV recorder and the program guide is updated as part of the start up process.
    Ola, John!
    Re 'Start of Day' function:

    If you give your custom command the label '.autoexec', it will get executed when SrvrPowerCtrl is initialized. Note: any custom command label that starts with a '.' gets hidden and doesn't show up on the SrvrPowerCtrl menu. Hidden commands are still available from the cli, of course.

    Note, some time ago (I'm not sure if it started with lms 7.7.3 or 7.8) I had to redo all my SrvrPowerCtrl custom command cli strings, replacing the '%20's with spaces. I.e. I had to un-percent escape them. If your cli command doesn't work, you might try that.

  6. #1986
    Senior Member
    Join Date
    May 2009
    Location
    Brentwood, UK
    Posts
    364
    Quote Originally Posted by Wirrunna View Post
    I have used Server Power Control for years to shut my Squeezebox server down, more recently using the excellent End of Day functions.
    I also use a custom command to increase the data base cache size (cli//PRAGMA%20cache_size%20%3D%20250000) that appears to speed up various browsing functions. The only drawback with this command is that it is manual - I have to remember to execute it as my server wakes up automatically each morning.
    Is there a way of executing a command when the server starts up, in other words a "Start of Day" function ?

    At End of Day I shut down the server rather than hibernate as the server is also used as a TV recorder and the program guide is updated as part of the start up process.
    Hi John,

    Slightly off topic...

    I've tried your method of increasing db cache size using 'gharris999' suggested .autoexec label and removing %20 & %3D. How can I check that the LMS (7.8) db is actually using the increased cache size?

    Bob
    1 x Touch - LMS 7.8.0
    1 x Radio
    1 x Boom
    Lavry DA-10 DAC
    HP PC as main Media Server
    QNAP TS-509 3.6.1 running SSOTS v4.14
    Starfish Pre-amp : Based on NAIM
    Heavily modified NAIM NAP 250 Power-amp
    Behringer DEQ2496
    Linn Isobarik DMS

  7. #1987
    Senior Member
    Join Date
    Jan 2006
    Location
    South Coast, NSW, Australia
    Posts
    636
    Gordon, thank you - .autoexec is the go.
    Bob - good question ! Can we pursue it over here - http://forums.slimdevices.com/showth...se-more-memory ?
    Last edited by Wirrunna; 2012-05-29 at 01:19.
    A camel is a racehorse designed by a committee.

  8. #1988
    Junior Member
    Join Date
    Jun 2012
    Posts
    1

    Prevent from Suspend?

    Hi,

    Thankx for this great plugin!

    I installed SrvrPowerCtrl (beta) at my SqueezeboxServer7.7.2 (on Debian6.0.4). Now I've two questions:

    1: I would like to use the CPU-load option to prevent the server from going to suspend when working with the server. My CPU-load is around 0.1 at idle and between 0.2 and 0.8 in part load. How can I set the value to 0.15? Obviously only integers are allowed.

    2: I use the server as multimedia and internet desktop as well. So I wrote a little script to prevent suspending when I work with epiphany or amarok. That is my code:


    #!/bin/bash

    declare -i progactive
    progactive=0
    progactive=$(pgrep epiphany || pgrep amarok)

    if (($progactive>0))
    then
    exit 1
    else
    exit 0
    fi

    This works well except epiphany or amarok crashes. Pgrep still returns a PID. Anyone knows a better solution? I'm not a programmer anyway ;-)

    Thanks a lot.

    Snoopy81

  9. #1989
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by Snoopy81 View Post
    Hi,

    Thankx for this great plugin!

    I installed SrvrPowerCtrl (beta) at my SqueezeboxServer7.7.2 (on Debian6.0.4). Now I've two questions:

    1: I would like to use the CPU-load option to prevent the server from going to suspend when working with the server. My CPU-load is around 0.1 at idle and between 0.2 and 0.8 in part load. How can I set the value to 0.15? Obviously only integers are allowed.

    2: I use the server as multimedia and internet desktop as well. So I wrote a little script to prevent suspending when I work with epiphany or amarok. That is my code:


    #!/bin/bash

    declare -i progactive
    progactive=0
    progactive=$(pgrep epiphany || pgrep amarok)

    if (($progactive>0))
    then
    exit 1
    else
    exit 0
    fi

    This works well except epiphany or amarok crashes. Pgrep still returns a PID. Anyone knows a better solution? I'm not a programmer anyway ;-)

    Thanks a lot.

    Snoopy81
    Try:

    progactive=$(pgrep -f 'epiphany|amarok' | wc -l)

    Re CPU load: I'm away from home for the next couple of weeks without access to a computer (and typing this with an iPad) so let me try to answer that question after the 21st when I can look at the code.
    Last edited by gharris999; 2012-06-10 at 05:44.

  10. #1990
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by Snoopy81 View Post
    1: I would like to use the CPU-load option to prevent the server from going to suspend when working with the server. My CPU-load is around 0.1 at idle and between 0.2 and 0.8 in part load. How can I set the value to 0.15? Obviously only integers are allowed.
    How are you computing your CPU load? On linux systems, SrvrPowerCtrl is parsing /proc/loadavg and using the 1st decimal number for the 1 minute average. See: http://www.lindevdoc.org/wiki//proc/loadavg

    Here is the code I'm using:

    cpuload.pl:
    Code:
    #!/usr/bin/perl -w
    
    sub CPUStat {
    
    	my $szRegEx;
    	my $cpustats;
    	my $cpuload = 0.00;
    
    	my $procloadavg = '/proc/loadavg';
    	if (! -e $procloadavg || !open(PLA, "<$procloadavg")) {
    		return 0;
    	}
    	$cpustats = <PLA>;
    	close(PLA);
    	#1.42 1.00 0.84 2/328 2842
    	$szRegEx = '^\s*(\d+\.\d+).*$';
    
    
    	if ( $cpustats =~ /$szRegEx/ ) {
    		$cpuload = $1;
    	}
    
    	return $cpuload;
    }
    
    
    my $cpuaverage = CPUStat();
    
    print("CPU load: $cpuaverage (last 1 min average)\n");
    On my system, with a reasonably CPU intensive task running (rsync), I'm getting a figure of:

    # CPU load: 2.34 (last 1 min average)

    So for me, a CPU load threshold setting of 2 should be about right.

    What do you get with the above script when you're running your "part load"?

    If you're still seeing results below 1, and before I change the plugin to allow decimal numbers for that setting, would you be willing to try editing the:

    /var/lib/squeezeboxserver/prefs/plugin/srvrpowerctrl.prefs

    ..file? Try adding your decimal number to the:

    nIdleCPULoadThreshold:

    ..entry and see if that does the trick for you.

    PS: if you set SrvrPowerCtrl's logging setting to debug, you'll see the CPU stats show up in the server log. You may need to turn off all the other SrvrPowerCtrl idle detections in order to see it. SrvrPowerCtrl goes through it's list of idle states to check and stops checking at the first 'not idle' condition it finds. I.e., music playing trumps everything else and will prevent the other checks from occurring.
    Last edited by gharris999; 2012-06-21 at 11:40.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •