Jump to content

kricker

Members
  • Posts

    785
  • Joined

  • Last visited

Everything posted by kricker

  1. Will this new GUI architecture finally allow for a mobile view if someone codes it?
  2. Thanks for the reply. So even though I can see a trickle of activity running by using bwm-ng, I should still be fine with the value of 0.00? I'll checkout that plugin. I've been meaning to anyhow.
  3. Well, now I've tried it with a value of 2048000.00, figuring it is bytes and not KB. Yet that didn't work either. I'd really like to get this to work. Currently if I am playing a 30 minute show, enough of it gets cached in RAM, that the disks spin down and unRAID goes to sleep during the playback. If I can successfully get the network check working I can alleviate this issue.
  4. Well I finally got around to installing the bwm-ng package. I have set my sleep script to a value of: noTCP='500.00' # what constitutes absence of TCP activity Based on our earlier conversation, I take it this means 500.00 KB over x minutes, which I have set to 2: extrnlTimeoutTicks=2 # ticks of no external activity before sleep; only after spindown+internal countdown So the drives spindown. Then over the next 2 minutes if it does not receive 500.00 KBs of traffic total the system should then enter sleep. Correct? Right now it is not going to sleep. Maybe 500.00 is too low a value. While running bwm-ng I can see a trickle of constant activity (I have no clue what it is). Maybe over those 2 minutes that trickle adds up to more than 500.00.
  5. Ahh that might be the trick. I do not seem to have that installed. I'll have to go looking for that and how to install it.
  6. So if that value is set to 10, would it need exactly 10 bytes of traffic over the last 5 minutes cause it to sleep? Sorry if this is a stupid question. I'm just trying to understand it better. What is the Linux command to check what amount of bytes are currently being transmitted? I'd like to be able to turn different plugins off and check to see which may be transmitting data and how much.
  7. Ahh I thought that value was like a threshold amount. Something in the vein of anything less than this amount counts as no traffic.
  8. Can anyone tell me what values noTCP is looking for in the following s3.sh file? I've tried values of 0, 1 and 100. No matter what I put there unRAID will never sleep if checkTCP is set to yes. #!/bin/bash # constants yes="yes" no="no" # [CONFIGURATION] # before going to sleep intrnlTimeoutTicks=1 # ticks after HDD spindown before checking for external activity extrnlTimeoutTicks=5 # ticks of no external activity before sleep; only after spindown+internal countdown # control of internal timeout checkHDDs=$yes # check if all HDDs are parked before counting down towards sleep noCountdownHours="" #07 08 17 18 19 20 21" # only countdown towards sleep outside these hours # example: <noCountdownHours="07 08 19 20"> # always countdown: <noCountdownHours=""> # control of external timeout checkTCP=$yes # check for TCP activity pingIPs="192.168.0.4" # do not sleep if <$pingsIPs> are pingable # example: <pingIPs="192.168.1.4 192.168.1.5"> # no ping-check: <pingIPs=""> # after waking up from sleep doDhcpRenewal=$no # <$no> for servers w/static IP address forceGb=$no # might not be needed; probably always safe # [/CONFIGURATION] # implementation stuff ticklengthSecs=60 # probe hardware + count down every minute/60secs, aka a tick noTCP='100.00' # what constitutes absence of TCP activity flash=/dev/`ls -l /dev/disk/by-label| grep UNRAID | cut -d"/" -f3 | cut -c 1-3` # automatic id of flash drive check_hour() { echo $(date +%H) } check_HDD_activity() { if [ $checkHDDs = $yes ] then # probe the flash drive at your peril HDDs=$((for d in $(ls /dev/[hs]d? | grep -v "$flash"); do hdparm -C $d | grep active ; done) | wc -l) else HDDs=0 fi echo $HDDs } check_TCP_activity() { if [ "$checkTCP" = $yes ] then TCP=$(bwm-ng -o csv -c 1 -d 0 -T avg | grep eth0 | cut -d";" -f5) else TCP="$noTCP" fi echo "$TCP" } check_IP_status() { mp_online=$no # initialize to "no" until we learn otherwise # ping each of the media servers to determine if online for i in "$pingIPs" do # ping the media server; if it answers, it is online out=`ping -q -c 1 $i 2>/dev/null` rec_count=`echo "$out" | grep received | cut -d " " -f4` if [ "$rec_count" -eq 1 ] then mp_online=$yes # if one is online, we do not need to ping # any others, break out of the "for" loop. break; fi done echo $mp_online } pre_sleep_activity() { #/usr/local/sbin/mover #echo $(date) Mover Complete sleep 5 /bin/sync echo $(date) Sync Complete } post_sleep_activity() { #cp /var/log/pm-suspend.log /boot/suspendlogs/post_pm-suspend.log_`date +"%d_%m__%H_%M_%S"`.log # Force NIC to use gigabit networking if [ "$forceGb" = $yes ] then ethtool -s eth0 speed 1000 #ethtool -s eth0 autoneg on fi logger -i -tsleepscript -plocal0.info "Waking up from SLEEP" # Force a DHCP renewal (shouldn't be used for static-ip boxes) if [ "$doDhcpRenewal" = $yes ] then /sbin/dhcpcd -n fi echo DONE echo $(date) unRAID Server Online } # main echo $(date) Starting S3 script intrnlCountdown=$intrnlTimeoutTicks extrnlCountdown=$extrnlTimeoutTicks while [ 1 ] do # do not countdown during certain hours hour=`check_hour` hourMatch=$(echo "$noCountdownHours" | grep "$hour" | wc -l) if [ $hourMatch -eq 0 ] then # count number of HDDs that are not parked HDDact=`check_HDD_activity` if [ "$HDDact" -eq 0 ] then # tick-tock for time since last spindown if [ $intrnlCountdown -gt 0 ] then intrnlCountdown=$[$intrnlCountdown-1] fi else # reset countdown, following HDD activity intrnlCountdown=$intrnlTimeoutTicks extrnlCountdown=$extrnlTimeoutTicks fi if [ $intrnlCountdown -le 0 ] then # check for persistent external activity TCPact=`check_TCP_activity` IPping=`check_IP_status` if [ "$TCPact" = $noTCP -a "$IPping" = $no ] then if [ $extrnlCountdown -le 0 ] then # Do pre-sleep activities #sync pre_sleep_activity sleep 5 # Go to sleep echo $(date) Going to sleep NOW! echo $(date) unRAID Server Offline #sleep 5 #echo -n 3 > /proc/acpi/sleep echo -n mem >/sys/power/state # #new sleep command, take care of KB and monitor #/boot/custom/bin/s2ram -f -p -m # or -s # #Ytterligare ett annat commando # #For kernel 2.6 and newer #echo -n mem > /sys/power/state #PM-SUSPEND #pm-suspend # Do post-sleep activities post_sleep_activity sleep 5 intrnlCountdown=$intrnlTimeoutTicks extrnlCountdown=$extrnlTimeoutTicks else # tick-tock for persistent external activity if [ $extrnlCountdown -gt 0 ] then extrnlCountdown=$[$extrnlCountdown-1] fi fi else # reset countdown, following external activity extrnlCountdown=$extrnlTimeoutTicks fi fi fi # Wait a tick sleep $ticklengthSecs done
  9. So my unRaid box just will not WOL. I can set eth0 to wake on g. But every time it sleeps and I wake it via the power button, eth0 has been reset to wake on d. My guess is this is happening on its way to sleeping. Will this s2ram be of any use to me? Or since my NIC is always getting set to wake on d, am I just SOL?
  10. The latest script in this thread takes care of that for you I believe. It has settings to not let the server sleep if there is network access or the discs are not spun down. Download the script and open it up to look at it. The settings are all in the first part of the script.
  11. Can someone who understands all the changes and modifications please update the wiki accordingly? Maybe also add info about using bwm-ng and pm-utils and why one would need them. It has been awhile since I played around with s3 and unraid. When I came back to this thread I was overwhelmed at all the changes and additions to the original s3.sh script . I was wanting to reset mine up from scratch but now I am somewhat confused on what script would be best to use and what the bwm-ng package and pm-utils package do.
  12. I though about s2ram, but since I don't even have a monitor hooked up to it now, it didn't really matter. I just used the monitor to get it setup.
  13. Anyone have a clue why this may be? Most likely it's due to a bug/feature in the MB BIOS implementation of S3. Seems to be. After flipping ACPI bios settings willy nilly, it is now working....mostly. It doesn't re-post video on resume, but I don't care. It's a headless system now that its running anyhow.
  14. I have got a system to wake from S3. But once it does, the shares are not accessible, nor can I telnet into it or view the webgui. It is as if the system is either hung or not re-negotiating the Ethernet link. I used the sleep script from the wiki which has a line to re-establish the dhcp. I believe it is a copy of the one from this post. After more testing it appears the system will wake from s3 properly if a monitor is attached, but not if there is no monitor attached.
  15. http://lime-technology.com/forum/index.php?topic=4405.30 Did that not work for you?
  16. Just tired beta 4.5.7 with the new kernel and my system still doesn't wake by magic packet. I have to manually press the power button. After waking, I see my NIC is still getting reset to wake on: d. It is set to g before I send the sleep command. Is there something going on during the process it does before sleeping that is causing this to happen? I've read some posts around the net where people are modifying certain files such as rc.local. Does either of these have any bearing here? Oddly enough I also noticed if I set eth0 to wake on "pumbg", after I wake it manually it will be set on "pumb", the g goes away.
  17. Good notes. Hopefully one day I'll be able to use them BTW, on step 6, I am pretty sure you have to spin down the drives before sleeping or you will always end up with a parity check on resume.
  18. Okay, I'm not quite there yet. Maybe if a new beta comes out it'll have that or newer kernel.
  19. Linux 2.6.29.1-unRAID. root@Tower:~# uname -a Linux Tower 2.6.29.1-unRAID #2 SMP Thu Apr 23 14:17:18 MDT 2009 i686 Intel(R) Pe ntium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux root@Tower:~#
  20. As per bubbaq's earlier advice, I hooked up an old drive installed windows and set the NIC to WOL. It is working fine with windows XP. The strange thing though is that the NIC light still goes out while in standby. But, it does wake with a magic packet nicely. After confirming this, I rebooted into unRAID. I telnetted in and checked the NIC using "ethtool eth0". The NIC was set to "Wake-on: g": I stopped the RAID then executed the sleep command "echo 3 > /proc/acpi/sleep". The PC would not WOL at this point. I could still wake it with the keyboard. After I woke it using the keyboard I checked the NIC again. This time it said "Wake-on: d". I believe this means it was disabled. Did it get disabled before it went into sleep?
  21. Is this a drive option you are setting using a WD tool? Or a BIOS option you have?
  22. Take a look at this post here. Use the code posted there to create a WOL.py script. Edited it ad described in the post for your needs. You can then run that from XBMC a few ways; manually whenever you want to wake the NAS, you can link to it using an autoexec.py script which will run whenever XBMC is first launched, or edit the skins .xml file and add a second onclick action to the menu item that takes you to the media on the NAS <onclick>XBMC.RunScript(Q:\scripts\Wake\WOL.py)</onclick>
×
×
  • Create New...