gabbott
-
Posts
194 -
Joined
Content Type
Profiles
Forums
Downloads
Store
Gallery
Bug Reports
Documentation
Landing
Posts posted by gabbott
-
-
I try to summarize here the steps for the beginners like me who would like to implement the sleep 3 state at their server including the very last modifications:
1. First check that your server is able to go to S3 and wake up via WOL according to this guideline:
http://lime-technology.com/wiki/index.php?title=Setup_Sleep_(S3)_and_Wake_on_Lan_(WOL) or you could do this via unMENU (http://lime-technology.com/forum/index.php?topic=5568.msg51814#msg51814) if you have already installed it.
2. Then download "bwm-ng-0.6-i486-2bj.tgz" package according to Joe's clear guidelines:
http://lime-technology.com/forum/index.php?topic=3657.msg41705#msg41705 or in a more convenient way using the unMENU add-on.
3. Then download the following script (s3.txt) by ReneV with the most recent modifications mentioned above (I have just added the changes mentioned in this thread after the script was uploaded - in addition for the sake of brevity I changed the name to s3.sh).
The modifications include:
- code correction ("$pingIPs" => $pingIPs)
- activated the TCP checking (default = no, here it is changed to yes => checkTCP=$yes)
- checks if the cache drive has data, moves that data to the data disks before going to sleep (added => /usr/local/sbin/mover)
If you want to configure the script, open it and change the IPs of your media players or client computers - I have added mine 192.168.0.10 and 192.168.0.100 here - if you don't want to add remove them from the appropriate line and leave it as <pingIPs="">. You don't need anything else.
4. After you have made your changes, save the attached s3.txt as s3.sh!
5. Upload the "s3.sh" script to your FLASH disk and save it e.g. /boot/custom/bin. (Create a directory at the root of your FLASH drive and call it custom/bin. So, the "custom" folder should be at the same level as your "bzimage" and "bzroot". Drop the s3.sh script within /custom/bin folder, so the final path should be "boot/custom/bin/s3.sh"). I have changed the location to /boot/custom/bin since it is the suggested path for user scripts and these scripts can be modified via unMENU!
6. REMEMBER to CHMOD your script! Go to the directory where your script is and type "chmod +x s3.sh" at the console.
7. Now, we need to INSTALL the bwm-ng package after reboot as well as to run the s3.sh script. For this, you need to get hold of your "go" file under /boot/config directory and add 3 lines to the very END of your "go" file like I did:
installpkg /boot/packages/bwm-ng-0.6-i486-2bj.tgz
cd /boot/custom/bin
nohup ./s3.sh &
The 1. line will install the bwm-ng package that you already have (=> /boot/packages/)
The 2. line will change the directory to the folder where you have your script (=> /boot/custom/bin)
The 3. line will run the script at the background.
8. Now go to your server stop your array and reboot your server. Everything should be fine.
Hope that I did not miss anything
Added: Check also this if you don't want to do much hand work.
OK, used this post to get things setup, made one change, I replaced "/usr/local/sbin/mover" with "/bin/sync" since i don't have a cache drive and this way the discs sync before sleeping.
So, if I understand this correctly, with my script config, if none of my 4 media clients are on and all the hard drives are spun down (I have my drives set to spin down after 1 hour), my unraid box will go to sleep. Do I have the correct logic?
-
Ok, forgive me if this seems elementary but new to scripting. So I've got my server working with S3 sleep and all my xbmc boxes are now configured to wake the server when they come out of sleep. I've testing sleep using the sleep script in unmenu.
So what I'd like to do is configure my unraid box to go to sleep after say about 2 hours of inactivity. Do I have to put the script in one of the cron folders?
Also, how do I configure things so the box doesnt sleep when doing things like a parity check or when something is streaming from it or I'm writing to it? Just trying to automate all this and this should be the last step.
Looking for better ideas how how to sleep/suspend my unraid box
in User Customizations
Posted
Yeah, I noticed that, must be something with windows but my script doesnt have the problem, built it using vi.