X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fqos.sh;h=0318af126e6e2cd4f02ad304be142c5008a8e0b6;hb=dd99ddf9f22921535c3f083e91bfc06a566e382b;hp=db33465a25b726f4ac40f48e4ccc4a6bac15166b;hpb=d2d56f38da01001c92a09afc6b52b5acbd9bc13c;p=fs%2Flustre-release.git diff --git a/lustre/tests/qos.sh b/lustre/tests/qos.sh index db33465..0318af1 100644 --- a/lustre/tests/qos.sh +++ b/lustre/tests/qos.sh @@ -17,20 +17,16 @@ rm -fr $MOUNT/* sleep 1 # to ensure we get up-to-date statfs info set_qos() { - for i in `ls /proc/fs/lustre/lov/*/qos_threshold`; do - echo $(($1/1024)) > $i - done - for i in `ls /proc/fs/lustre/lov/*/qos_maxage`; do - echo $2 > $i - done + lctl set_param lov.*.qos_threshold=$(($1/1024)) + lctl set_param lov.*.qos_maxage=$2 } # assume all osts has same free space -OSTCOUNT=`cat /proc/fs/lustre/lov/*/activeobd | head -n 1` -TOTALAVAIL=`cat /proc/fs/lustre/llite/*/kbytesavail | head -n 1` +OSTCOUNT=$(lctl get_param -n lov.*.activeobd | head -n 1) +TOTALAVAIL=$(lctl get_param -n llite.*.kbytesavail | head -n 1) SINGLEAVAIL=$(($TOTALAVAIL/$OSTCOUNT)) MINFREE=$((1024 * 4)) # 4M -TOTALFFREE=`cat /proc/fs/lustre/llite/*/filesfree | head -n 1` +TOTALFFREE=$(lctl get_param -n llite.*.filesfree | head -n 1) if [ $SINGLEAVAIL -lt $MINFREE ]; then echo "ERROR: single ost free size($SINGLEAVAIL kb) is too low!"