Dynamix - S3 Sleep


Recommended Posts

Not enough info. What unraid version do you use? Please post a screenshow of the plugins config page. Does the error occur when you have it set to base settings? Do you have drives outside the array? What log messages do you get when you enable the plugin? Only that above? Please post this part of the log.

Link to comment
  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Ok, first of all thanks for the reply.

 

Here is the extra info:

 

I'm using unraid 5.0.5 with sleep plugin version 2.1.1.

 

A screenshot of my plugins config is attached. Note that only the device inactivity field keeps its value, if i set the idle treshold value to i.e. "20", it disappears after I click "Apply".

 

The error also occurs with the default settings. I have one disk outside of the array. I just installed the snap plugin and have the error with or without it.

 

These are the last lines of my /boot/logs/s3_sleep.log:

 

Thu May  8 13:08:19 CEST 2014: Disk activity detected. Reset all counters. /dev/

sde drive state is: active/idle

Thu May  8 13:09:19 CEST 2014: Disk activity detected. Reset all counters. /dev/

sde drive state is: active/idle

Thu May  8 13:10:19 CEST 2014: Disk activity detected. Reset all counters. /dev/

sde drive state is: active/idle

Thu May  8 13:11:19 CEST 2014: Disk activity detected. Reset all counters. /dev/

sdb drive state is: active/idle /dev/sdc drive state is: active/idle /dev/sdd dr

ive state is: active/idle /dev/sde drive state is: active/idle

Thu May  8 13:12:20 CEST 2014: Disk activity detected. Reset all counters. /dev/

sdb drive state is: active/idle /dev/sdc drive state is: active/idle /dev/sdd dr

ive state is: active/idle /dev/sde drive state is: active/idle

Thu May  8 13:13:20 CEST 2014: Disk activity detected. Reset all counters. /dev/

sdb drive state is: active/idle /dev/sdc drive state is: active/idle /dev/sdd dr

ive state is: active/idle /dev/sde drive state is: active/idle

Thu May  8 13:14:20 CEST 2014: Disk activity detected. Reset all counters. /dev/

sdb drive state is: active/idle /dev/sdc drive state is: active/idle /dev/sdd dr

ive state is: active/idle /dev/sde drive state is: active/idle

 

It repeats these lines for the rest of the log.

 

How are you supposed to set an excluded disk? There is no field for it in the GUI and when editing /boot/config/plugins/dynamix/dynamix.s3.sleep.cfg, neither "exclude" nor "excludeList" keep their values after applying my settings.

s3_plugins_config.png.da45e9a7033a3b1ca4a63a51a420dafe.png

Link to comment

Well normally you should never edit the config manually. :) There should be a dropdown to select the exclude mode and a select box listing the drives outside the array. They are both missing from your screenshot. The question is why they are missing.

 

For now I would recommend to uninstall the s3sleep plugin. Delete all dirs/files referring to the plugin from your flash drive. Then reboot to clear everything what is left and start a fresh syslog.

 

After reboot check that the other dynamix plugins work correctly. If they do, please reinstall s3sleep. Redownload the plugin to be sure the download was not corrupt. Then try again with stock settings. If the dropdown and listbox for disks outside array is missing again, please upload the complete syslog to pastebin or something and post a link. We'll start more complex troubleshooting then.

Link to comment

Tried re-downloading, re-installing and rebooting three times. Deleted all s3 references I could find (with find) but the issue still remains.

 

You can take a look at my syslog here: http://pastebin.com/Pnv9W5wr

 

I checked the HTML source code and saw the input fields were present but hidden, maybe that is how it is coded on certain conditions?

 

<option value=''>No</option><option value='-a' selected>Yes</option>  </select></td>

  </tr>

  <input type="hidden" name="exclude" value="">

  <input type="hidden" name="excludeList" value="">

  <tr><td>Extra delay after array inactivity (minutes):</td>

  <td><input type="text" name="timeout" maxlength="2" value="30">default = 30 minutes</td>

  </tr>

Link to comment

Yes it is. If no drives outside the array are found, the options to exclude those drives are hidden. So far that is correct, or do you have drives outside, that are not detected?

 

If not, the problem is that it doesn't save your settings and gives the php error on the page when you click apply or done? The syslog itself does not show s3sleep errors as far I can tell. I'll recheck the functionality on my system and report back later. If I don't find problems on mine I'll ask you to try some more things to pinpoint the error.

 

Edit: Hmm... No problems on my system. Could you open a shell window and run:

/usr/local/sbin/s3_sleep -ED

What output do you get exactly? Even empty lines if there are. (Then please tell me how many.)

 

Also please post the content of

/boot/config/plugins/dynamix/dynamix.s3.sleep.cfg

 

How did you install the plugin? Through dynamix's plugin control plugin?

Link to comment

The output of the command is one empty line.

 

This is the content of dynamix.s3.sleep.cfg:

 

service="1"
checkHDD="-a"
timeout="30"
interval="3"
port="eth0"
checkTCP=""
idle="0"
login=""
pingIP=""
stopDay=""
stopHour=""
dhcpRenew=""
forceGb=""
setWol=""
preRun=""
postRun=""
debug="1"
exclude=""
excludeList=""
options="-C 1 -a -m 30 -e eth0 -D 1"

 

Since I'm running a custom kernel, I tried booting the stock unRAID kernel but get the same results, hidden input fields and error message. I did reinstall all my plugins after switching to the new kernel and copied my old plugins folder to /boot/config/plugins_old so I could compare settings or files if necessary but the dynamix subfolder is deleted. But this should not make a difference I believe.

 

The first time I installed through the dynamix plugin control plugin, afterwards I reinstalled it manually a couple of times.

 

I'll reinstall after deleting the _old folder and test again.

 

EDIT: No difference unfortunately.

 

Link to comment

Sorry for the late reply. Did some more analyzing on this and found some coding problems that need fixing. As I'm rather busy at the moment, this will take some time.

 

Fact is you have a disc outside the array? Then s3_sleep -ED should not display an empty line. There is a bug in there we'll have to find.

 

I never used idle threshold myself, so I did not notice until now. You are correct, it loses its value, so there is another bug thats needs to be fixed. Do all other values stick?

 

 

 

 

Link to comment

Further testing on my system shows the idle value propably sticks too. The problem is that it does not get shown on the config page.

 

Could you please issue the following commands and post the output?

echo /dev/$(ls -l /dev/disk/by-label | awk -F/ '/UNRAID/ {print $3}' | cut -c1-3)

echo $(awk '/\/mnt\/cache/ {print $1}' /proc/mounts | cut -c1-

echo $(ls -l /dev/disk/by-id/[au]* | grep -v part1 | sed 's/.*id\///g' | sed 's/-> ..\/..\//\/dev\//g' | awk '{ print $2 "|" $1}' | sort -k1)

while read ini; do case $ini in rdevName.*) device=${ini#*=}; if [ ! "/dev/$device" == "/dev/" ]; then echo "/dev/$device "; fi; esac; done < /proc/mdcmd

Link to comment

Sure, output in order of your commands:

 

/dev/sda

 

[empty line]

 

/dev/sda|usb-Kingston_DT_Micro_1C6F654FF40FBC41591108DC-0:0 /dev/sdb|ata-WDC_WD20EFRX-68AX9N0_WD-WMC300052677 /dev/sdc|ata-WDC_WD20EARX-00PASB0_WD-WMAZA9666863 /dev/sdd|ata-SAMSUNG_HD103SJ_S246J9KB425239 /dev/sde|ata-WDC_WD3200BEVT-75ZCT1_WD-WXE708HN0888

 

/dev/sdb
/dev/sdc
/dev/sdd

 

As I'm running the free version, there is no cache drive.

Link to comment

That is propably the reason -ED fails. :) The empty line when no cache is detected is jumbling something up in the script I guess. I never tested it with no cache drive present. :) Please give me a little time to take a closer look. I'll report back once I have news. Thank you very much for patiently helping me  finding the core of the problems.

 

edit:

could you maybe edit s3_sleep and replace the  76

devicelist+=("$cache");

with

if [ "$cache" != "-" ]; then devicelist+=("$cache"); fi

 

Then please run s3_sleep -ED again and post the output. Ideally it should be your drive outside the array. If it is, then please check if the error message in the settings still appears. The change will not survive a reboot, but if it works, I'll fix it on github and send a pull to include it in the official version.

 

Link to comment

That seems to have done the trick. With the adjustment, I get the excluded disk form fields and applying my settings reloads the page seemingly without error.

 

Only thing that's left now is the network idle field that doesn't keep its value.

 

Edit: Thank you for getting to the bottom of this. Now I can start testing the script with various settings.

Link to comment

I'm using unRaid 5.0.4 and 2.0.1 version of S3 Sleep (the only one that is working properly on my machine). I would like to spin up all my drives after wakeup command. In plug-in settings there is field to enter custom command after wakeup, can anyone can tell me what command should I put there?

Link to comment
  • 1 month later...

Been using the sleep functionality for a while, but am facing another issue. When using the network idle threshold value my server never goes to sleep even though its network activity seems to stay below the threshold (according to system stats).

 

Anyone else having this issue? What is the best way to troubleshoot this?

 

I'm using unRaid 5.0.4 and 2.0.1 version of S3 Sleep (the only one that is working properly on my machine). I would like to spin up all my drives after wakeup command. In plug-in settings there is field to enter custom command after wakeup, can anyone can tell me what command should I put there?

 

See here http://lime-technology.com/forum/index.php?topic=13019.msg123528#msg123528

Link to comment

Someone posted some time ago, that there is an error in the network checking of the s3sleep script of dynamix. He also said he was going to fix it and send the code. But he never did, so the bug is propably still in there. Could you test with the standalone s3sleep script from this thread and report if it works for you? If it does, it might be possible to port the changes there over to the dynamix script, to fix the issues.

Link to comment
  • 3 weeks later...

I am having a really odd issue with this plugin. I just installed version 2.1.2. When I enter the settings and hit apply, I get the following error popup at the bottom of the settings page:

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

 

At this point the webGUI becomes inaccessible, similar to Stripe's issue early in this thread. I confirmed that emhttp is running by issuing the command:

lsof -i -n -P | grep emhttp

 

I have to restart the unRaid system to get the webGUI working again.

Link to comment

Hi Kricker,

 

I'm sad to hear you have problems. I'll need some more info.

 

- What is your unraid version?

- How did you install the plugin?

- Did you reboot afterwards? (Normally not necessary, but I won't hurt to try. :) )

- Did you have an older version of the plugin before?

- Does the error occur when you still have the default settings? Or did you change anything? If so, please post a screenshot of your settings before you hit apply.

- A full syslog would be great also. :)

 

regards

 

SlrG

Link to comment

Thanks SlrG, below are the details you requested. Thanks for the help.

 

UnRaid 5.05

 

Installed plugin from the Dynamix plugin screen.

 

After rebooted the system appears to be fine as long as I don't enter the S3 Sleep settings and hit apply. The system hasn't had a chance for the plugin to kick in and put the server to sleep though.

 

I did have an older version before....I think. If I recall I tried the plugin early on, but had issues with the webGui not responding during boot when the plugin was installed. So I disabled it and today when I tried installing it again.

 

The only setting I changed was to enable sleep.

t69vli.jpg

Do you want a syslog after I hit Apply and the webGUI hangs or after a reboot with the plugin installed? I gotta read up on how to find the syslog, but I can do it.

Link to comment

If you are still able to connect a shell window when the gui hangs, then yes, a syslog after you clicked apply would be great. Beforehand, please try to enable debug mode on the s3 sleep settings page (output to syslog). You'll find the syslog at /var/log/syslog. Also I'll need the content of /boot/config/plugins/dynamix/dynamix.s3.sleep.cfg.

 

Another idea would be to disable all other not dynamix plugins. It might be some unknown clash between plugins. If it should work after disabling the other plugins you could try to reenable one by one, to find the culprit. If it still doesn't work after disabling all others, we will be sure, that something is wrong with the plugin on your system.

Link to comment

No problem. :) I'll be on vacation starting tomorrow however. If we don't solve the problem today, it will have to wait till I return or some other user has an idea how to help you. :) Sorry.

 

Another question: Do you have other drives in your system besides the array drives and the cache?

 

Link to comment
  • 2 weeks later...
  • 2 weeks later...

Someone posted some time ago, that there is an error in the network checking of the s3sleep script of dynamix. He also said he was going to fix it and send the code. But he never did, so the bug is propably still in there. Could you test with the standalone s3sleep script from this thread and report if it works for you? If it does, it might be possible to port the changes there over to the dynamix script, to fix the issues.

 

Kind of late but just got around to testing that script. After excluding my disk outside the array from the HDD activity check and adjusting the idle network activity value it seems to work. (With the logging enabled I could check which idle value to use for my system.) It also has a feature to prevent sleep/shutdown with a lock file which I like.

 

Gonna try this script out for a while now.

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.