Dynamix - S3 Sleep


Recommended Posts

@bonienl

Hmm... If 2.0.1 works, it must be related to my changes that it stopped working. If followed the thread closely, but I don't see were I could have gone so wrong, that it would stop the webgui from responding?!

 

On my system it works fine. :( If you need any assistence in finding the problem, feel free to contact me any time. :)

 

I have no problems on my system either, though will look into the issue and sure ask your help in case needed !

Link to comment
  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I have no problem with 2.0.3 since install till today,  but a small one.

 

Server didn´t sleep last night, all disks were spun-down and have no activated other options in the plugin. Today I discover than process was "stopped". I click on Done and it start. 30 minutes later server was sleeping as suppose to be.

 

I´ll keep a vigilant eye on the plugin but it seems to work fine.

 

Jan  6 23:23:04 unraid kernel: mdcmd (202): spindown 4
Jan  7 00:00:26 unraid kernel: mdcmd (203): spindown 0
Jan  7 00:00:26 unraid kernel: 
Jan  7 00:00:31 unraid kernel: mdcmd (204): spindown 4
Jan  7 00:00:31 unraid kernel: 
Jan  7 04:30:08 unraid kernel: mdcmd (205): spindown 3
Jan  7 04:30:49 unraid emhttp: shcmd (161): /usr/sbin/hdparm -y /dev/sdc &> /dev/null
Jan  7 04:33:09 unraid kernel: mdcmd (206): spindown 2
Jan  7 04:40:01 unraid apcupsd[30485]: apcupsd exiting, signal 15
Jan  7 04:40:01 unraid apcupsd[30485]: apcupsd shutdown succeeded
Jan  7 04:40:06 unraid apcupsd[11760]: apcupsd 3.14.10 (13 September 2011) slackware startup succeeded
Jan  7 04:40:06 unraid apcupsd[11760]: NIS server startup succeeded
Jan  7 05:05:51 unraid kernel: mdcmd (207): spindown 4
Jan  7 06:28:02 unraid emhttp: shcmd (162): /usr/sbin/hdparm -y /dev/sdc &> /dev/null
Jan  7 08:04:26 unraid apcupsd[11760]: UPS Self Test switch to battery.
Jan  7 08:04:37 unraid apcupsd[11760]: UPS Self Test completed: Not supported
Jan  7 14:12:26 unraid sSMTP[21529]: Creating SSL connection to host
Jan  7 14:12:27 unraid sSMTP[21529]: SSL connection using RC4-SHA
Jan  7 14:12:29 unraid sSMTP[21529]: Sent mail for [email protected] (221 2.0.0 closing connection uq2sm45345579wjc.5 - gsmtp) uid=0 username=root outbytes=1835
Jan  7 19:06:38 unraid s3_sleep: ----------------------------------------------
Jan  7 19:06:38 unraid s3_sleep: command-args=-C 1 -h 00 -h 21 -h 22 -h 23 -a -m 30 -e eth0 -F -D 0
Jan  7 19:06:38 unraid s3_sleep: action mode=sleep
Jan  7 19:06:38 unraid s3_sleep: check array=yes
Jan  7 19:06:38 unraid s3_sleep: exclude flash=yes (/dev/sda)
Jan  7 19:06:38 unraid s3_sleep: exclude cache=- (/dev/sdc)
Jan  7 19:06:38 unraid s3_sleep: exclude outside=no ()
Jan  7 19:06:38 unraid s3_sleep: check network=no
Jan  7 19:06:38 unraid s3_sleep: check device=
Jan  7 19:06:38 unraid s3_sleep: check SSH=no
Jan  7 19:06:38 unraid s3_sleep: check TTY=no
Jan  7 19:06:38 unraid s3_sleep: version=2.1.1
Jan  7 19:06:38 unraid s3_sleep: ----------------------------------------------
Jan  7 19:06:38 unraid s3_sleep: Devicelist: /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj
Jan  7 19:06:38 unraid s3_sleep: Excluded: /dev/sda
Jan  7 19:06:38 unraid s3_sleep: ----------------------------------------------
Jan  7 19:06:38 unraid s3_sleep: s3_sleep process ID 29012 started, To terminate it, type: s3_sleep -q
Jan  7 19:36:46 unraid kernel: PM: Syncing filesystems ... done.
Jan  7 23:04:53 unraid kernel: Freezing user space processes ... (elapsed 0.01 seconds) done.
Jan  7 23:04:53 unraid kernel: Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Jan  7 23:04:53 unraid kernel: Suspending console(s) (use no_console_suspend to debug)

Link to comment

I have no problem with 2.0.3 since install till today,  but a small one.

 

Server didn´t sleep last night, all disks were spun-down and have no activated other options in the plugin. Today I discover than process was "stopped". I click on Done and it start. 30 minutes later server was sleeping as suppose to be.

 

Did you start the process after upgrading or assumed it was running after the upgrade ?

Link to comment

I have one 'weird' observation myself...

 

After waking-up from sleep mode all my disks are in spun-down state except the last one in the list (disk 11 in my case) and this disk won't spin down automatically, need to do a manual action.

 

Anyone else with similar observation ?

 

Link to comment

I assumed it was running :-)

 

--------

 

No here with the last disk isuue. When my server awake it depends of the way I wake up I have:

 

- all disk keep idle/spundown (cache included) --> this when I wake up with a WOL only

- movies/shows share spin up --> this when I wake up with a XBMC WOL and a library update begins.

 

Both ways are correct.

Link to comment

I have one 'weird' observation myself...

 

After waking-up from sleep mode all my disks are in spun-down state except the last one in the list (disk 11 in my case) and this disk won't spin down automatically, need to do a manual action.

 

Anyone else with similar observation ?

 

I have this problem as well. Last drive and Cache drive spin up.

 

Kevin.

Link to comment

I have one 'weird' observation myself...

 

After waking-up from sleep mode all my disks are in spun-down state except the last one in the list (disk 11 in my case) and this disk won't spin down automatically, need to do a manual action.

 

Anyone else with similar observation ?

 

I have this problem as well. Last drive and Cache drive spin up.

 

Kevin.

 

Are you using an Asus motherboard as well (see my sig) ?

Link to comment

I have one 'weird' observation myself...

 

After waking-up from sleep mode all my disks are in spun-down state except the last one in the list (disk 11 in my case) and this disk won't spin down automatically, need to do a manual action.

 

Anyone else with similar observation ?

 

I have this problem as well. Last drive and Cache drive spin up.

 

Kevin.

 

Are you using an Asus motherboard as well (see my sig) ?

 

No. I have an Intel DP55KG with the data disks on an M1015 and the cache drive on a 2 port card.

 

Kevin

Link to comment

One more issue withe S3... yesterday i was replacing one of my data drives with bigger one and I was unable to access gui after that. I had to remove S3 Sleep plugin and reinstall it after the whole process ended. I'm using 2.0.1 version of your plugin.

 

Still looking into your problem, but can't reproduce it myself, makes it hard to know what exactly is going on  ::)

Link to comment

Same for me. To replace a disk, the array has to be stopped first. This will invoke the the stop event which in turn will trigger the s3sleep script to end itself. After the disk is replaced, the array has to be started again. This will invoke the start event and start s3sleep, too. I have no idea where this could cause the plugin to get broken in a way that it has to be reinstalled. Also cant't reproduce the error. :(

Link to comment

Don't know if it's related to the script, if not maybe anyone else can point me into the right direction...

My MB is the SP X7SPE-HF-D525 with IPMI, the system is properly going to sleep, but after waking it up the GUI isn't reachable, shares are available. I waking it up from windows cmd with wolcmd.exe http://www.depicus.com/wake-on-lan/wake-on-lan-cmd.aspx typing the MAC and IP address from the unraid server (192.168.1.160) IPMI has a different IP (192.168.1.140). After the wake-up the IPMI View says wrongly: ACPI System Power State: S3 and power of, but the system is ON. I tried to waking it up from IPMI View with the Power Up button, after that IPMI View displays the ACPI state correctly, but still no unraid GUI, can't open the KVM Console too. The only thing I can do, is telnetting the system an execute the powerdown script...

Any ideas how do I correctly wake-up my system from S3?

Thanks in Advance!

Link to comment

Thanks for the tip! I googled a bit and ended every time in the lime-technology forum :)

Found this: http://lime-technology.com/forum/index.php?topic=11310.msg145951#msg145951 Looks like the property command to put the system sleep is different:

                                # Go to sleep
#                                        echo 3 > /proc/acpi/sleep
# Above deprecated on UnRaid 5 and above
# To go to sleep use this instead ->
		echo -n mem >/sys/power/state

Can it be configured in your script? If yes, then can you help me setting it?

Link to comment

Thanks for the tip! I googled a bit and ended every time in the lime-technology forum :)

Found this: http://lime-technology.com/forum/index.php?topic=11310.msg145951#msg145951 Looks like the property command to put the system sleep is different:

                                # Go to sleep
#                                        echo 3 > /proc/acpi/sleep
# Above deprecated on UnRaid 5 and above
# To go to sleep use this instead ->
		echo -n mem >/sys/power/state

Can it be configured in your script? If yes, then can you help me setting it?

 

You are referring to the 'old' and 'new' command syntax to invoke sleep mode, the new syntax is already used and does not need to be configured.

 

 

Link to comment
  • 2 weeks later...

Before I tried S3 sleep from SimpleFeatures ... to no avail.

 

Today I noticed the Dynamix new WebGUI + plugins, where it appeared as if S3 sleep is working properly now.

So installed it. Again to no avail!

 

After waking up, nothing is available; no shares, no webgui, no telnet ... error "host does not exist".

Only rebooting helps.

 

With 6 months unnecessary 24/7 uptime, any help is highly appreciated.

 

And yes, it does support wake-on: pumbg

Link to comment
  • 1 month later...

I wanted to test the S3 Plugin first with the shutdown command, but for some reason one my disks never spun down. So I'm thinking about the detection rules. I know I can check for network or connected users, but if I enable those do all checks have to evaluate to true, or just one of em (essentially is it a AND && or OR || combination)?

Link to comment

It's AND all the way. If a disk is still spinnig the system won't go to sleep. If you are connected via ssh or telnet and have this set to be checked, it won't go to sleep even if all disks are down. You have to find the problem why the disk doesn't spindown or you won't be able to sleep or shutdown.

 

If it is the cache disk, you can exclude it from the check. If it is a drive outside the array you can exclude it too.

 

It is propably some plugin that keeps the disk spinning.

 

 

Link to comment

Thanks for the clarification. I will see if I can configure it then to disregard the status of the disks (maybe only listen for network traffic instead). I have no idea why the drive didn't spin down last night. I checked the syslogs and it was never issued a spindown command. The drive is still empty at the moment and no reads nor writes were registered to that drive. I only installed Dynamix WebGUI and most of its plugins (no Webserver but all the rest I think).

Link to comment

Ok so I'm at home now and having a look at the settings. I haven't found a readme or anything so I have to ask here.

 

Does 'Wait for device inactivity' actually ping a given (list?) of ip adresses? that would be what I'm looking for. like as long as my HTPC is on the net, unRaid also stays online.

 

I tried figuring out where the actual script is, so I can have a look at its source to figure out what the options really do, but I haven't been able to find that yet.

Link to comment

Thanks for the reply. I have been on a weekend trip myself and now back to building the unRaid server. I tried playing around with the network settings, but for some reason it didn't seem to help. I enabled the debug mode and monitored the log file but there doesn't appear any message that it is testing the supplied IP adress. I can see in the syslog that the ip is listed but it's not being tested.

Link to comment
  • 2 weeks later...

Hello there, I'm trying to modify the script to add some features, but due to lack of time and coding skills and want to share my idea and findings for someone to takeover and do it more properly than me. If someone is willing to continue this project.

 

the idea: add a Sabnzbd check status  to see if sabnzbd is downloading before sleep

 

what is needed:

- http://stedolan.github.io/jq/download/  (to parse sabnzbd json output)

- to modify dynamix.s3.sleep-2.1.0-noarch-bergware.plg to add 2 values : sabnzbbd IP and sabnzbd API

- to modify SleepSettings.php to add 2 values : sabnzbbd IP and sabnzbd API

- to modify s3_sleep to add 2 parameters : -s (to pass sabnzbd IP) and -sa (to pass sabnznd API key)

 

the idea is to create a fie with the status output of sabnzbd and parse it to check if sabnzbd is downloading.

I did it with this " wget -0 dynamix.s3.sleep.sabnzbd.xml "http://sabnzbdIP:port/api?output=json&apikey=sabnzbdAPIkey&mode=qstatus&output=json|xml"

 

and parse it with this command: cat dynamix.s3.sleep.sabnzbd.xml | jq '.mbleft'  --> to get how much megabits is left to download or this command :  cat dynamix.s3.sleep.sabnzbd.xml | jq '. state'  --> to get status of sabnzbd ("downloading" or "idle")

 

Voilà !!!! If someone is interested to takeover feel free. Or I will do it when i will have more patience and time.

 

Link to comment
  • 3 weeks later...

After finally getting my server to wake up properly, I'm trying out the sleep script.

 

Problem is, it doesn't work and I get the following error:

 

Warning: implode(): Invalid arguments passed in /usr/local/emhttp/update.sleep.php on line 13

 

Also, can anyone point me in the right direction to properly configure this plugin? Do I have to add a speed to the idle field or just a value? Why is there no field for the excluded disks and how do you set them in the config dynamix.s3.sleep.cfg? Do you put them in the exclude or the excludeList variable ...

 

Oh, and @gerard6110 and others who have problems waking up their server: you are probably missing a module for some hardware. I had the same trouble until I included a driver for my GPU (ATI of course). Try a full Slackware install on another HD attached to your server and test again. If it works, look at the loaded modules and rebuild a kernel with the missing ones or just the ones you think are necessary. Look for the guides on the WiKi on how to build a custom kernel and/or do a full Slackware install. If you are willing to spend some time on it and are comfortable with running a custom kernel, it should be possible to make it work.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.