Endless problems with WOL

Moderator: Lillian.W@AST

aka
Posts: 29
youtube meble na wymiar Warszawa
Joined: Mon Sep 12, 2016 12:19 pm

Re: Endless problems with WOL

Post by aka »

I think you mixing up to many things. At this moment we are talking about LAN only. This feature worked in the past. I do not know what you referring to as"magic pockets etccccc" - sounds wired
I can only wake up NAS through Power Button or through the ADM (but it takes very very long time). Yes I have noather Linux based NAS and there are no issues to wake it up. I also use ASUS router and I do not see any extra settings in router or Asustor for this.
User avatar
Nazar78
Posts: 2068
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Endless problems with WOL

Post by Nazar78 »

aka wrote:I think you mixing up to many things. At this moment we are talking about LAN only. This feature worked in the past. I do not know what you referring to as"magic pockets etccccc" - sounds wired
I can only wake up NAS through Power Button or through the ADM (but it takes very very long time). Yes I have noather Linux based NAS and there are no issues to wake it up. I also use ASUS router and I do not see any extra settings in router or Asustor for this.
That is the problem here glad you brought it up. Read back your previous 2nd post below. You mentioned you can wake it up from CC which is obviously from LAN. LAN equates same network subnet. So it works from LAN case close.

But then you mentioned portal and another LAN location (different subnet) or another country. These are not LAN. This requires WOW support not WOL. Or at least WOL that's properly setup in your network to make it work off-site, i.e. proper router setup and the magic packets that you claimed not to understand. Some of my devices doesn't support WOW but I can make it work.

Are we now on the same page?
aka wrote:Mo model is Model: 3104T
I do not understand your question. I simply turn ON WOL in the Control Center, that's all.
When I use Control Center I can wake it up (through the menu), but when I try to access it through the page portal it will not wake up. Obviously in the case of remote access (for example I want to login to the NAS from another location LAN, or another country) I cannot do this. Perhaps I am missing something, but not sure why this is not working.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
gazebo
Posts: 2
Joined: Tue Aug 31, 2021 12:05 pm

Re: Endless problems with WOL

Post by gazebo »

magic pockets ? what's this ?

Let me explain it again, as there is some confusion. Waking up from LAN takes place only when I am in ASUSTOR CONTROL CENTER and it takes almost forever. When I use any other App or ADM on the same or another PC nothing will wake NAS, period. I have no problem to wake up my other NAS (running Open Media Vault on Linux) or other computers or devices. ASUSTOR is the only one that doesn't work.
User avatar
Nazar78
Posts: 2068
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Endless problems with WOL

Post by Nazar78 »

gazebo wrote:magic pockets ? what's this ?
Read the previous post?

Let me explain it again, as there is some confusion. Waking up from LAN takes place only when I am in ASUSTOR CONTROL CENTER and it takes almost forever.
There's no confusion. You already said it works from "ASUSTOR CONTROL CENTER". That is a working WOL. The time it takes to resume depends on the number of processes/apps running. Also in your previous post you mentioned "In case I need to access it from WAN", now this is WOW.

When I use any other App or ADM on the same or another PC nothing will wake NAS, period. I have no problem to wake up my other NAS (running Open Media Vault on Linux) or other computers or devices. ASUSTOR is the only one that doesn't work.
"on the same"? This contradicts what you've said earlier that it works from "ACC". What app? Which ADM? We don't even know what's your NAS model to begin with.
To all who's having this issue, it's very simple to troubleshoot actually. But without the knowledge of your NAS model, how they are connected, network setup, segments etc, nobody can help you with this. Layout/screenshot everything in your network, routers/switches/APs/devices including its IPs/masks/gateways only then we can start troubleshooting. I bet any techie can remote into your network and find the root cause very quickly.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
orion
Posts: 3485
Joined: Wed May 29, 2013 11:09 am

Re: Endless problems with WOL

Post by orion »

gazebo wrote: I have no problem to wake up my other NAS (running Open Media Vault on Linux) or other computers or devices.
How do you wake up your other NAS or other computers or devices? I believe you should find the cause in the answer of this question.
ktlin
Posts: 5
Joined: Sun Sep 12, 2021 12:01 am

Re: Endless problems with WOL

Post by ktlin »

orion wrote:Note: you should let Control Center save NAS MAC address first when NAS is working (ACC -> Action -> WOL -> WOL setting).
Made an account only to say thanks! This solved my issue.

After a certain ACC update, the app probably had its previously configuration reset. This is why I could WOL directly from the app, but after the update, I would not be able to see the NAS when it was in sleep mode, but could see it when it was awake.

Extra Note: I thought that once you connect to the NAS, the Control Center app would automatically remember the MAC/IP or whatever it needs to connect back to the device at a later time.
It doesn't! You have to explicitly press the "WOL Setting" and select the MAC address, for this to work. Just as @orion said.
jconradh
Posts: 1
Joined: Tue Jun 20, 2023 10:38 am

Re: Endless problems with WOL

Post by jconradh »

I'm pretty ignorant about some of this, however, I have manually set the IP address of my Asustor Lockerstor 4 AS6604Tv1, so I don't understand why just trying to connect via the IP address doesn't wake the system form sleep. I have to go to the network closet and hit the power button, which is glowing yellow, to wake it. Shouldn't this be idiot proof, and I am the idiot I am speaking of. There have been a few explanations of how someone got this to work, but they are not as explicit as I need them to be to figure it out, as again I am ignorant. This NAS seems to be for SOHO, so I thought it would not require a full registered CISCO certified network admin to manage it.

Thanks. jeff
User avatar
Nazar78
Posts: 2068
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Endless problems with WOL

Post by Nazar78 »

jconradh wrote:I'm pretty ignorant about some of this, however, I have manually set the IP address of my Asustor Lockerstor 4 AS6604Tv1, so I don't understand why just trying to connect via the IP address doesn't wake the system form sleep. I have to go to the network closet and hit the power button, which is glowing yellow, to wake it. Shouldn't this be idiot proof, and I am the idiot I am speaking of. There have been a few explanations of how someone got this to work, but they are not as explicit as I need them to be to figure it out, as again I am ignorant. This NAS seems to be for SOHO, so I thought it would not require a full registered CISCO certified network admin to manage it.

Thanks. jeff
It's the same with your laptop or PC, they don't just wake up when you access using IP, they need some sort of events like time, WOL or USB peripherals interactions.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
fwmone
Posts: 1
Joined: Tue Jan 30, 2024 4:30 pm

Re: Endless problems with WOL

Post by fwmone »

My AS6702T didn't go into standby either, but the HDDs at least went into sleep mode. However, standby is a crucial feature for me. In my case, the cause was mdadm and Docker container tasks (mainly immich, but also Portainer, Paperless, Stash).

I finally solved it with a script with which I monitor CPU usage, Samba logins and network traffic every 2s. I start the script at system startup via...

/usr/local/etc/init.d/S99idle_monitor start

Code: Select all

#!/bin/sh
#
# Start the idle_monitor....
#

case "$1" in
  start)
        echo "Starting idle_monitor..."
        /volume1/home/fwmone/scripts/idle_monitor.sh > /dev/null &
        ;;
  stop)
        echo -n "Stopping idle_monitor..."
        ps aux  |  grep -i /idle_monitor.sh  |  awk '{print $1}'  |  xargs kill
        ;;
  restart|reload)
        "$0" stop
        "$0" start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit $?
The idle monitor is this script:

Code: Select all

#!/opt/bin/bash

if [ "$1" = "-d" ]
then
	debug=true
fi

idle_count=0
standby_count=420 # 420 = check every 2 seconds, 840s = 14min (due to 15min HDD standby, so that they do not wake up again)

while :; do
  message=""

  # Utilization of the CPU
  cpu_now=($(head -n1 /proc/stat))
  cpu_sum="${cpu_now[@]:1}"
  cpu_sum=$((${cpu_sum// /+}))
  cpu_delta=$((cpu_sum - cpu_last_sum))
  cpu_idle=$((cpu_now[4]- cpu_last[4]))
  cpu_used=$((cpu_delta - cpu_idle))
  cpu_usage=$((100 * cpu_used / cpu_delta))

  cpu_last=("${cpu_now[@]}")
  cpu_last_sum=$cpu_sum

  if [ "$debug" ]
  then
    echo "CPU usage at $cpu_usage%"
  fi

  if [ $cpu_usage -lt 6 ]
  then
  	idle_count=$((idle_count+1))
  else
  	idle_count=0
    message="CPU"
  fi


  # Anyone logged into Samba?
  if /usr/builtin/bin/smbstatus | grep No\ locked\ files
  then
    if [ "$debug" ]
    then
      echo "No Samba-Login"
    fi
  else
    if [ "$debug" ]
    then
      echo "Samba-Login"
    fi
    idle_count=0
    message="$message Samba"
  fi


  # Network traffic?
  tx_now=($(cat /sys/class/net/eth0/statistics/tx_bytes))
  tx_traffic=$((tx_now - tx_last))

  if [ $tx_traffic -lt 102400 ]
  then
    if [ "$debug" ]
    then
      echo "Little Traffic"
    fi
  else
    if [ "$debug" ]
    then
      echo "Much Traffic"
    fi
    idle_count=0
    message="$message Traffic"
  fi

  tx_last=$tx_now


  if [ "$debug" ]
  then
    echo "$idle_count - $tx_traffic - $message"
  fi
  echo "$idle_count - $tx_traffic - $message" > /volume1/home/fwmone/scripts/idle_count
  timestamp="$(date +"%Y-%m-%d %H:%M:%S")"

  if  [ -n "${message}" ]
  then
    echo "$timestamp > $idle_count - $tx_traffic - $message" >> /var/log/standby_log
  fi

  if [ $idle_count -gt $standby_count ]
  then
    idle_count=0
    message="Standby"
    echo "$idle_count - $tx_traffic - $message" > /volume1/home/fwmone/scripts/idle_count
    echo "$timestamp > $idle_count - $tx_traffic - $message" >> /var/log/standby_log

    /etc/init.d/NASsuspend
  fi

  sleep 2
done
It is neither professional nor really well written, but it has been working perfectly for several weeks now. Samba login takes effect when someone is working on the network drive. Traffic when I'm watching a movie, for example. CPU when I'm doing something in the Docker containers. I installed bash for this because the busybox shell was reaching its functional limits (and apart from that, I simply know the bash syntax).

/volume1 is my SSD drive for Docker, the HDDs are /volume2.

I also didn't want to use necessarily a Magic Packet to wake up the NAS, so I enabled unicast calls, too:

/usr/local/etc/init.d/S99wol

Code: Select all

#!/bin/sh

case $1 in
        start)
                echo "Setting WOL for eth0..."

                /sbin/ethtool -s eth0 wol ug
        ;;
        *)
                echo "usage: $0 {start}"
        exit 1
        ;;
esac
exit 0
u = unicast
g = Magic Packet

This also works quite well, e. g. when pinging the NAS or opening a Docker container using the webbrowser. The NAS takes a relatively long time to boot up (a good 10s, sometimes a little longer). This always results in the error "not reachable" in Firefox, but after a reload it works.

The Docker containers sometimes run tasks at night, things like backups or file scans. Because the NAS does not wake up automatically for this, I have written scripts that execute the tasks in the background in a controlled manner when waking up from standby. For example...

/usr/local/etc/init.d/P99backup_immich

Code: Select all

#!/opt/bin/bash
#
# Backup Immich once a week
#

case "$1" in
  suspend)
        ;;
  resume)
        echo "Starting backup process..."
        /home/fwmone/scripts/backup_immich.sh &
        ;;
  *)
        echo $"Usage: $0 {suspend|resume}"
        exit 1
        ;;
esac

exit $?
"&" so that the process runs in the background and does not interfere with the resume process. The "/usr/local/etc/init.d/" folder has not been overwritten in the last system update, so I guess, you can work with it quite safely. Nevertheless, I backup my scripts.

I hope this helps as an inspiration.
Asustor Lockerstor 2 Gen 2 AS6702T - 16GB DDR4
- 2x6TB Western Digital Red Pro SATA III 6TB (WD6003FFBX) RAID1 - data storage
- Fikwot FN950 1 TB - Docker drive
- Fikwot FN950 4 TB - films and TV shows
Post Reply

Return to “ADM general”