dispvm: sleep as long as there is any disk activity (#82)

This commit is contained in:
Marek Marczykowski 2012-01-15 04:42:35 +01:00
parent 30301440c4
commit 80acac0c4b

View File

@ -10,7 +10,15 @@ for app in $apps ; do
done
echo "Sleeping..."
sleep 60
PREV_IO=0
while true; do
IO=`vmstat -D | awk '/read|write/ {IOs+=$1} END {print IOs}'`
if [ $IO -lt $[ $PREV_IO + 50 ] ]; then
break;
fi
PREV_IO=$IO
sleep 1
done
ps ax > /tmp/dispvm-prerun-proclist.log