Dynamix - S3 Sleep


Recommended Posts

New version available

 

SlrG spotted and corrected a small typo causing the include/exclude list not to be generated properly.

---------------------------------------------------------------------------

 

Thanks to the contribution of user SlrG an update to the Dynamix S3 Sleep plugin is available.

 

SlrG added the feature to include/exclude drives outside of the array as an additional condition for entering sleep mode.

 

You can update to the new version using the plugin control page.

 

Or do a manual installation:

 

Download the PLG file (right click and choose 'save link as' - store in /boot/config/plugins

 

Telnet into your server and execute

 

cd /boot/config/plugins

installplg dynamix.s3.sleep-2.0.3-noarch-bergware.plg

The updated version has been tested and appears to work properly. Any feedback please provide in this topic.

 

Link to comment
  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I have excluded 3 disk ,an below its only show 2 excluded disk ( /dev/sda /dev/sdb) the disk that are missing in the excluded line are /dev/sdd , /dev/sde (The 2 Toshiba disks)

 

It,s also looks like the cache disk is exuded ? but can't see any settings for this.

 

 

Can you add a new settings for telnet session?

check TELNET=

 

root@tower:~# ps -ef | grep telnet
root     10935  1229  0 11:15 ?        00:00:00 in.telnetd: 192.168.0.116

 

command-args=-C 1 -a -A -E ata-Hitachi_HTS541010A9E680_J8100019J1XWJA,ata-TOSHIBA_MK5056GSY_903FTD4YT,ata-TOSHIBA_MK5056GSY_903FTD4PT -m 30 -e eth0 -D 0
Jan  5 11:18:16 tower s3_sleep: action mode=sleep
Jan  5 11:18:16 tower s3_sleep: check array=yes
Jan  5 11:18:16 tower s3_sleep: exclude flash=yes (/dev/sda)
Jan  5 11:18:16 tower s3_sleep: exclude cache=- (/dev/sdc)
Jan  5 11:18:16 tower s3_sleep: exclude outside=yes (ata-Hitachi_HTS541010A9E680_J8100019J1XWJA ata-TOSHIBA_MK5056GSY_903FTD4YT,ata-TOSHIBA_MK5056GSY_903FTD4PT)
Jan  5 11:18:16 tower s3_sleep: check network=no
Jan  5 11:18:16 tower s3_sleep: check device=
Jan  5 11:18:16 tower s3_sleep: check SSH=no
Jan  5 11:18:16 tower s3_sleep: check TTY=no
Jan  5 11:18:16 tower s3_sleep: version=2.1.1
Jan  5 11:18:16 tower s3_sleep: ----------------------------------------------
Jan  5 11:18:16 tower s3_sleep: Devicelist: /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo
Jan  5 11:18:16 tower s3_sleep: Excluded: /dev/sda /dev/sdb

Link to comment

Hi peter_sm,

 

your flash is on /dev/sda, your cache on /dev/sdc. Excluded are /dev/sda and /dev/sdb. So no, the cache is not excluded. The flash is, as that won't spindown anyway. If you want to exclude the cache drive, this option was already there before. You have to select it on "Wait for array inactivity:".

 

To solve the problem why not all of the disks you selected are excluded I need some help:

ata-Hitachi_HTS541010A9E680_J8100019J1XWJA is /dev/sdb. What /dev/??? are, ata-TOSHIBA_MK5056GSY_903FTD4YT and ata-TOSHIBA_MK5056GSY_903FTD4PT?

 

If you have a look at the parameter line, it shows the identifiers separated by a colon. That is correct.

In the exclude outside line there seems to be one missing, which propably breaks the correct exclusion.

Link to comment

@peter_sm:

Can you try to edit the /usr/local/sbin/s3_sleep script and change the following lines?

 

line 239:

excludeI=${excludeI/,/ }  --> excludeI=${excludeI//,/ }

line 252:

excludeE=${excludeE/,/ }  --> excludeE=${excludeE//,/ }

 

I think that should solve the problem. Please test and report back.

 

Also did you try the option "Wait for user login inactivity:"? If you set it to local it checks for console activity. If set to remote it checks for telnet and ssh access. If set to local and remote it checks for both.

Link to comment

 

Hi,

 

It's looks like it works.... and thanks for clarification about SSH / Telnet !

 

//Peter

 

command-args=-C 1 -a -A -E ata-Hitachi_HTS541010A9E680_J8100019J1XWJA,ata-TOSHIBA_MK5056GSY_903FTD4YT,ata-TOSHIBA_MK5056GSY_903FTD4PT -m 30 -L -e eth0 -D 0
Jan  5 19:55:04 tower s3_sleep: action mode=sleep
Jan  5 19:55:04 tower s3_sleep: check array=yes
Jan  5 19:55:04 tower s3_sleep: exclude flash=yes (/dev/sda)
Jan  5 19:55:04 tower s3_sleep: exclude cache=- (/dev/sdc)
Jan  5 19:55:04 tower s3_sleep: exclude outside=yes (ata-Hitachi_HTS541010A9E680_J8100019J1XWJA ata-TOSHIBA_MK5056GSY_903FTD4YT ata-TOSHIBA_MK5056GSY_903FTD4PT)
Jan  5 19:55:04 tower s3_sleep: check network=no
Jan  5 19:55:04 tower s3_sleep: check device=
Jan  5 19:55:04 tower s3_sleep: check SSH=yes
Jan  5 19:55:04 tower s3_sleep: check TTY=no
Jan  5 19:55:04 tower s3_sleep: version=2.1.1
Jan  5 19:55:04 tower s3_sleep: ----------------------------------------------
Jan  5 19:55:04 tower s3_sleep: Devicelist: /dev/sdc /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo
Jan  5 19:55:04 tower s3_sleep: Excluded: /dev/sda /dev/sdb /dev/sdd /dev/sde

Link to comment

After upgrading S3 Sleep i can't access unraid gui. I can acces files but gui is not working. Before upgrading, everything was fine...

 

Probably because the s3_sleep script is still running and prevents the GUI to return.

 

Can you telnet into your system and do

 

# ps -ef | grep s3_sleep

root    <pid>    1  0 21:16 ?        00:00:00 /bin/bash /usr/local/sbin/s3_sleep -C 1 -a -m 30 -L -e bond0 -D 0

 

# kill <pid>

 

Let me know if this works.

 

I updated the PLG file on github to stop the S3 sleep service before the update is applied. This should avoid problems like this.

Link to comment

After ps -ef | grep s3_sleep I got this:

root      1851  1704  0 21:38 pts/0    00:00:00 grep s3_sleep

root      5449    1  0 17:40 ?        00:00:00 /bin/bash /usr/local/sbin/s3_sleep -C 1 -a -m 15

 

then I've typed: kill 5449

 

unfortunately it didn't help...

Link to comment

I think yes...

 

root      1922  1704  0 21:53 pts/0    00:00:00 grep bwm-ng

No, you see your own command ...

 

The difference between your "upgrade" and mine was that in my case the S3_sleep service wasn't started (you may want to double-check it is really stopped).

Link to comment

I'm not sure what should I double check?

 

I've set the S3_sleep plugin to stop my server after 15 min. Then I was using WOL to wake it up. After upgrading plugin to version 2.0.2 when i wake my server i can access files using Total Commander for example, but when i type //tower i can't open the gui. I have to reboot server to access gui again...

Link to comment

Yes. After reboot i've got this:

COMMAND    PID  USER  FD  TYPE DEVICE SIZE/OFF NODE NAME

rpc.portm 1034  bin    4u  IPv4  3979      0t0  UDP *:111

rpc.portm 1034  bin    5u  IPv4  3980      0t0  TCP *:111 (LISTEN)

rpc.statd 1040  root    5u  IPv4  3997      0t0  UDP *:792

rpc.statd 1040  root    7u  IPv4  4008      0t0  UDP *:38055

rpc.statd 1040  root    8u  IPv4  4011      0t0  TCP *:58656 (LISTEN)

inetd    1053  root    4u  IPv4  4032      0t0  TCP *:37 (LISTEN)

inetd    1053  root    5u  IPv4  4033      0t0  UDP *:37

inetd    1053  root    6u  IPv4  4034      0t0  TCP *:21 (LISTEN)

inetd    1053  root    7u  IPv4  4035      0t0  TCP *:23 (LISTEN)

ntpd      1060  root  16u  IPv4  4045      0t0  UDP *:123

ntpd      1060  root  17u  IPv4  4049      0t0  UDP 127.0.0.1:123

ntpd      1060  root  18u  IPv4  7214      0t0  UDP 192.168.1.19:123

emhttp    3093  root    3u  IPv4  6100      0t0  TCP *:80 (LISTEN)

emhttp    3093  root    5u  IPv4  12611      0t0  TCP 192.168.1.19:80->192.168.1.15:52651 (ESTABLISHED)

nmbd      3124  root    9u  IPv4  6159      0t0  UDP *:137

nmbd      3124  root  10u  IPv4  6160      0t0  UDP *:138

nmbd      3124  root  11u  IPv4  6162      0t0  UDP 192.168.1.19:137

nmbd      3124  root  12u  IPv4  6163      0t0  UDP 192.168.1.255:137

nmbd      3124  root  13u  IPv4  6164      0t0  UDP 192.168.1.19:138

nmbd      3124  root  14u  IPv4  6165      0t0  UDP 192.168.1.255:138

smbd      3126  root  25u  IPv4  6268      0t0  TCP *:445 (LISTEN)

smbd      3126  root  26u  IPv4  6270      0t0  TCP *:139 (LISTEN)

avahi-dae 3138 avahi  13u  IPv4  6298      0t0  UDP *:5353

avahi-dae 3138 avahi  14u  IPv4  6299      0t0  UDP *:44248

in.telnet 5415  root    0u  IPv4  10092      0t0  TCP 192.168.1.19:23->192.168.1.15:52320 (ESTABLISHED)

in.telnet 5415  root    1u  IPv4  10092      0t0  TCP 192.168.1.19:23->192.168.1.15:52320 (ESTABLISHED)

in.telnet 5415  root    2u  IPv4  10092      0t0  TCP 192.168.1.19:23->192.168.1.15:52320 (ESTABLISHED)

 

Link to comment

emhttp    3093  root    3u  IPv4  6100      0t0  TCP *:80 (LISTEN)

emhttp    3093  root    5u  IPv4  12611      0t0  TCP 192.168.1.19:80->192.168.1.15:52651 (ESTABLISHED)

 

This shows emhttp (GUI) is working and accepting connections, normal condition ...

Link to comment

This was after a reboot. In meantime, I've upgraded the plugin to 2.0.3 version and now it seems it works correctly... I'll put the server to sleep several times to make sure...

 

The updated PLG file includes now code to stop the S3_sleep service before the upgrade is done, hopefully this was a one time off ...

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.