Snoopy81 wrote: > > 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. ------------------------------------------------------------------------ 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
