Last active
November 16, 2023 00:57
-
-
Save AndnixSH/037dada7e78683c2e81c417b193b8532 to your computer and use it in GitHub Desktop.
QNAP standby debug fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.qnap.com/en/how-to/faq/article/how-do-i-find-out-which-process-prevents-the-hard-drives-from-standby-mode | |
# wget https://eu1.qnap.com/Storage/tsd/utility/standby_debug.sh;sh standby_debug.sh | |
binary="" | |
case "$(uname -m)" in | |
*x86_64*) | |
echo "Arch: x86_64" | |
binary=https://download.qnap.com/Storage/tsd/utility/Disk_Standby_Debug_x86_64/Disk_Standby_Debug | |
;; | |
*aarch64*) | |
echo "Arch: aarch64" | |
binary=https://download.qnap.com/Storage/tsd/utility/Disk_Standby_Debug_arm64/Disk_Standby_Debug | |
;; | |
*armv7l*) | |
echo "Arch: armv7l" | |
binary=https://download.qnap.com/Storage/tsd/utility/Disk_Standby_Debug_arm_marvell/Disk_Standby_Debug | |
;; | |
*) | |
echo "Not supported Disk_Standby_Debug" | |
exit 1 | |
;; | |
esac | |
#cd /dev/shm | |
wget "$binary" | |
chmod +x Disk_Standby_Debug | |
echo "*******************************************************" | |
echo "Note: you may need to wait minutes for the first result" | |
echo "*******************************************************" | |
for i in {1..30}; do | |
echo -----${i}/30------ | |
echo $(date) | |
if [ $(cat /var/ledvalue) = 0x00010000 ]; then | |
echo The NAS is currently in Standby Mode | |
#echo $(cat /var/ledvalue) | |
else | |
echo The NAS is currently not in Standby Mode: | |
#echo $(cat /var/ledvalue) | |
fi | |
#echo $(free|grep Swap)$'\n' | |
./Disk_Standby_Debug --file 300 | |
echo wait for 5 mins $'\n' | |
sleep 300; | |
done 2>&1 | tee /tmp/Standby_test.log; | |
cp /tmp/Standby_test.log /share/Public | |
echo finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment