Looking for better ideas how how to sleep/suspend my unraid box


Recommended Posts

Skank

 

I have no idea what plink is. Did you read the documents for it or look up any examples? You likely have to just answer yes and carry on.

 

I believe you had a script or something running on that media player you are using (I don't recall the details and really don't care) which would do the same as pressing the sleep button on the unMENU interface. But, you complained that the sleep button didn't work right because your player was hanging up. So, try editing the script for the sleep button and using the line Joe gave you instead of what's there now. I thought this was suggested in the other thread where you were asking for it. I'm pretty sure the script is in the unmenu folder on the flash drive. The name should be fairly obvious.

 

Be careful when editing the script to use unix EOF and not DOS ones. Try telneting to the server and type mc to use Midnight Commander to access the server files and do the editing.

 

I hate to tell you, but people here (or anywhere for that matter) generally don't want to do the work for you when it appears you won't put in any effort yourself. I think your problem of not seeming to get help stems from that fact you were told what to change but it appears you never followed up on it or tried to change it. If you'd come back after making an effort with a question about what you had tried I'm sure you would have got more help.

 

Peter

 

Link to comment

Skank

 

I have no idea what plink is. Did you read the documents for it or look up any examples? You likely have to just answer yes and carry on.

 

I believe you had a script or something running on that media player you are using (I don't recall the details and really don't care) which would do the same as pressing the sleep button on the unMENU interface. But, you complained that the sleep button didn't work right because your player was hanging up. So, try editing the script for the sleep button and using the line Joe gave you instead of what's there now. I thought this was suggested in the other thread where you were asking for it. I'm pretty sure the script is in the unmenu folder on the flash drive. The name should be fairly obvious.

 

Be careful when editing the script to use unix EOF and not DOS ones. Try telneting to the server and type mc to use Midnight Commander to access the server files and do the editing.

 

I hate to tell you, but people here (or anywhere for that matter) generally don't want to do the work for you when it appears you won't put in any effort yourself. I think your problem of not seeming to get help stems from that fact you were told what to change but it appears you never followed up on it or tried to change it. If you'd come back after making an effort with a question about what you had tried I'm sure you would have got more help.

 

Peter

 

 

well i didnt want to press yes, cause i was afraid to harm something, thatswhy i asked first.

 

about the sleep script.. yes i didnt go further, cause using the sleep button on unmenu, does make it go to sleep.. however, the internet explorer hangs cause its waiting for unraid to give a signal back and it doesnt, thatswhy the mediaplayer does the same thing..

 

You talk about the line Joe gave, but where is that? Maybe i overlooked..

Well i want to try to solve it, im going to take a look tomorrow to edit the script, if i can find it :P

use unix EOF and not dos ones? what do you mean, i know nothing about linux

 

i'll see if i can edit the files, i dunno how but i'll use mc and see

 

and yes, i just have a dsf file on the usb stick in the dune

That dsf file (which does exactly the same as the sleep unmenu button) i run from the dune so it  goes to sleep

So in other words, i give the guy from mpcclub the command i run from my pc to make unraid go to sleep, and he makes it as a dsf file which i can run from the dune

 

So i'm looking a way to do this from the pc (without having the explorer hanging..) so the dune wont hang either

 

 

edit: on a post from Joe L, in previous page, he says

echo "echo 3 >/proc/acpi/sleep" | at now + 1 minute

 

might try if that solves anything

but ill try editing script tomorrow

and do some searching ;)

 

Link to comment

Edit it , with editpad lite

 

it still hangs...

 

it looks like this now

 

#define USER_SCRIPT_LABEL S3 Sleep

#define USER_SCRIPT_DESCR Put the server to S3 Sleep

#UNMENU_RELEASE $Revision: 58 $ $Date: 2010-04-17 09:13:05 -0400 (Sat, 17 Apr 2010) $

 

# by using a USER_SCRIPT_TEST this button

# will not show itself unless S3 is supported in /proc/acpi/sleep

# the button label will be that printed by the "awk" command

 

#define USER_SCRIPT_TEST cat /proc/acpi/sleep | grep "S3" | awk '{ print "Go to S3 Sleep" }'

 

echo "<pre>"

# pre-sleep, sync the disks

echo "Syncing disks"

/bin/sync

 

# go to sleep

echo 3 > /proc/acpi/sleep | at now + 1 minute

echo "Awaking from sleep"

 

# Do post-sleep activities, reset wake-on-lan

ethtool -s eth0 speed 1000

ethtool -s eth0 wol g

 

Link to comment

Edit it , with editpad lite

 

it still hangs...

 

it looks like this now

 

#define USER_SCRIPT_LABEL S3 Sleep

#define USER_SCRIPT_DESCR Put the server to S3 Sleep

#UNMENU_RELEASE $Revision: 58 $ $Date: 2010-04-17 09:13:05 -0400 (Sat, 17 Apr 2010) $

 

# by using a USER_SCRIPT_TEST this button

# will not show itself unless S3 is supported in /proc/acpi/sleep

# the button label will be that printed by the "awk" command

 

#define USER_SCRIPT_TEST cat /proc/acpi/sleep | grep "S3" | awk '{ print "Go to S3 Sleep" }'

 

echo "<pre>"

# pre-sleep, sync the disks

echo "Syncing disks"

/bin/sync

 

# go to sleep

echo 3 > /proc/acpi/sleep | at now + 1 minute

echo "Awaking from sleep"

 

# Do post-sleep activities, reset wake-on-lan

ethtool -s eth0 speed 1000

ethtool -s eth0 wol g

 

You did not add command as I described, so the echo is still running immediately.

 

You need to add the line as I gave in my example.

echo "echo 3 >/proc/acpi/sleep" | at now + 1 minute

not as you added it

echo 3 > /proc/acpi/sleep | at now + 1 minute

Link to comment

ok i'll change it exactly as you say, see if that helps

 

edit: it worked !

woehoe

thx mate !

The dune doesnt hang anymore either..

running http://192.168.xxx.xxx:8080/user_scripts?command=Go+to+S3+Sleep

makes it go to sleep now

and bringing me to this:

 

sleepi.jpg

 

 

it doesnt crash..

 

 

so i got what i want now :)

Just hoping putting to sleep is safe for fire.. and doesnt use much more power than completely shut it down

Link to comment
  • 5 weeks later...

Hi,

 

I am stucked witch ACPI S3 on Beta 5.10. (browsed now for hours the forum)

 

I have understood that

echo -n 3 > /proc/acpi/sleep is not working anymore in 5.xx

s2ram is not working starting beta4 as commented by Joe L. Both packages are not available in unmeu 1.5 anymore

echo -n mem >/sys/power/state stops the server working

 

My mo-board is supporting S3 (by logfile).

 

So: what is the actual method to set the server in S3 in 5.10b mode? If any tools needed, where to get them?

 

Thanks for support

 

 

Link to comment

Hi!

 

For some year ago I have issue with sleep, then I found some solutions, I added this in my syslinux.cfg, and I have not get any problem since then.

 

label unRAID OS
  menu default
  kernel bzimage
  append initrd=bzroot acpi_sleep=s3_bios

 

 

Peter

 

Is there any further explantion to get S3 working on an unRAID-Server (beta10)?

 

I activated S3 on my Supermicro-Board. "ethtool" shows this:

 

== Cut ===

    Supported ports: [ TP ]

        Supported link modes:  10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Supports auto-negotiation: Yes

        Advertised link modes:  10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Advertised pause frame use: Symmetric Receive-only

        Advertised auto-negotiation: Yes

        Speed: 1000Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: on

        MDI-X: Unknown

        Supports Wake-on: pumbg

        Wake-on: g

        Current message level: 0x00000033 (51)

        Link detected: yes

=== Cut ===

 

My idea is to send the server to sleep automatically, when there is no traffic to the IP of the unRAID-Server for a certain time (e.g. 2 hours).

 

When I try to access the system the array should start automatically again.

 

Is there any tutorial in which is described who to do this? Or is this even possible?

 

Bye.

 

 

Link to comment

My idea is to send the server to sleep automatically, when there is no traffic to the IP of the unRAID-Server for a certain time (e.g. 2 hours).

 

When I try to access the system the array should start automatically again.

 

Is there any tutorial in which is described who to do this? Or is this even possible?

 

Bye.

 

 

That's not how wake-on-lan works.  You need to send a special wake-up packet. And, it has to be listening for it.

 

Joe L.

Link to comment

Hi,

 

I am stucked witch ACPI S3 on Beta 5.10. (browsed now for hours the forum)

 

I have understood that

echo -n 3 > /proc/acpi/sleep is not working anymore in 5.xx

s2ram is not working starting beta4 as commented by Joe L. Both packages are not available in unmeu 1.5 anymore

echo -n mem >/sys/power/state stops the server working

 

My mo-board is supporting S3 (by logfile).

 

So: what is the actual method to set the server in S3 in 5.10b mode? If any tools needed, where to get them?

 

Thanks for support

 

 

 

Have you tried simpleFeatures? It has a s3 sleep button. It works for me. I am running Beta 5.10. You should be able to find a way to hook into this function.

 

Reed

Link to comment

I found something yesterday night: https://wiki.archlinux.org/index.php/Acpid

 

echo -n mem > /sys/power/state

 

seems somehow to stop the server. It stopped responding, but lights did not switch off. I was not able verify yesterday if the server died or went to S3, as WOL was not working. But this seems to be a MoBo issue with my asus a7n8.

 

Will report further results next days.

 

Update:

 

echo -n mem >/sys/power/state halts the server, no reaction to anything at all. (PSU, CPU Fan still running, Lan Down, No wakeup on WOL, no Wakeup on Power button)  Meanwile I got WOL working, but S3 is still not working .. :-(

 

 

Link to comment
  • 1 month later...

root@NAS:~# bash -x /boot/config/s3.sh

' drives='/dev/sda /dev/sdb /dev/sdc

+ timeout=$'15\r'

+ count=$'15\r'

/boot/config/s3.sh: line 21: syntax error near unexpected token `done'

/boot/config/s3.sh: line 21: `done'

root@NAS:~# cat /boot/config/s3.sh

#!/bin/bash

drives="/dev/sda /dev/sdb /dev/sdc"

timeout=15

count=15

while [ 1 ]

do

hdparm -C $drives | grep -q active

if [ $? -eq 1 ]

then

  count=$[$count-1]

else

  count=$timeout

fi

if [ $count -le 0 ]

then

  powerdown

fi

# Wait a minute

echo COUNT $count

sleep 60

done

root@NAS:~#

 

Somebody help me!

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

@bonienl, I discovered your very nice addition to the Simple Features plugin. Thanks for the hint. I was already looking quite a while for a way to send the server to sleep when no one needs it (PCs, Macs, HDTVs etc.)

 

When I'm trying to activate the S3 sleep function, the pulldown menu is going back to "disabled" right after I'm pressing the apply button. Syslog is showing:

Jan  6 11:59:13 Tower s3_sleep: killing s3_sleep process 8040 (Minor Issues)
Jan  6 11:59:13 Tower s3_sleep: s3_sleep process ID 11658 started, To terminate it, type: s3_sleep -q

 

Here is the important part of the go script:

# Simple Features Plugin
installpkg /boot/packages/simpleFeatures-0.9f.tgz
/usr/sbin/s3_sleep -a -R -F -m 30

 

Any idea what I did wrong?

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.