Firmware Release 04.05.00-320 (11/28/2017) Discussion

It is difficult to determine what is causing the disk to wake up. Here is script I call checkgen1.sh. It sleeps for 4 seconds then checks /proc/diskstats to see is any disk activity has occurred. If it has it then does a find to list those files that have been accessed in the last minute. Since it wakes up every 4 minutes it will display the same file names during that minute. You just need to run it for a couple of minutes if the system is not sleeping. If the system is sleeping you can let it run a little longer. If you are using putty turn on logging. So that it will save the output.

file checkgen1.sh
#!/bin/bash
function test () {
if [ “$3” != “$2” ]; then
da=date +%k-%M-%S
A=$2
B=1
ior_sda=${A#-}
iow_sda=${A%-
}
A=$3
ior_sdaold=${A#-}
iow_sdaold=${A%-
}
let a=ior_sda-ior_sdaold
let b=iow_sda-iow_sdaold
if [ $4 -ne 1 ]; then
echo -n $da " "
fi
printf "%4s %4s %4s " “sda”$1 $a $b
fi
}

function GetData {
for (( i=1; i<8;i++ ));
do
y=printf "%s%s" $3 $i
x=awk -v disk="$y" '{if ($3==disk) printf "%s-%s",$10,$6}' /proc/diskstats
sda[$i]=$x
done
}
while :; do
GetData ior_sda1 iow_sda1 “sda”
B=0
for (( i=1; i<8;i++ ));
do
test $i “${sda[$i]}” “${sdb[$i]}” $B
done
sdb=(“${sda[@]}”)
if [ $B -eq 1 ]; then
echo
find / -path /proc -prune -o -path /sys -prune -o -cmin -1
fi
sleep 4
done