X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre-iokit%2Fobdfilter-survey%2Fobdfilter-survey;h=adb5b6b8c890dec2c357a27e55b34503b2e332e6;hb=0ab950762cdec28636b6033c50a2e563c28ba954;hp=d75ac4709d9a90342aeecb66ea15a699a22b3e4f;hpb=9ef9906d70d784d4e9e62e4d77143fc2bd427980;p=fs%2Flustre-release.git diff --git a/lustre-iokit/obdfilter-survey/obdfilter-survey b/lustre-iokit/obdfilter-survey/obdfilter-survey index d75ac47..adb5b6b 100755 --- a/lustre-iokit/obdfilter-survey/obdfilter-survey +++ b/lustre-iokit/obdfilter-survey/obdfilter-survey @@ -1,5 +1,4 @@ #!/bin/bash -set -e ###################################################################### # customize per survey @@ -311,8 +310,8 @@ restart_thr=1 restart_nobj=1 # machine's page size (KB) -PAGE_SIZE=${PAGE_SIZE:-$(($(getconf PAGE_SIZE) / 1024))} -PAGE_SIZE=${PAGE_SIZE:-4} +PAGE_SIZE_KB=${PAGE_SIZE_KB:-$(( ${PAGE_SIZE:-$(getconf PAGE_SIZE)} / 1024))} +PAGE_SIZE_KB=${PAGE_SIZE_KB:-4} snap=1 clean_srv_OSS=0 @@ -434,7 +433,7 @@ if [ $case == "network" ]; then exit 1 fi # Now start client setup - osc_names_str=$($lctl dl| grep osc | grep -v mdt | grep UP) + osc_names_str=$($lctl dl| grep osc | grep -v mdt | grep UP || true) if [ -n "$osc_names_str" ]; then echo "The existing setup must be cleaned"; exit 0; @@ -471,7 +470,7 @@ for ((i=0; i < $ndevs; i++)); do host=${host_names[$i]} devno=($(get_ec_devno $host "${client_names[$i]}" "${ost_names[$i]}")) if ((${#devno[@]} != 3)); then - exit 1 + cleanup 2 fi devnos[$i]=${devno[0]} client_names[$i]=${devno[1]} @@ -505,8 +504,8 @@ for ((rsz = $rszlo; rsz <= $rszhi; rsz*=2)); do # compute parameters total_thr=$((ndevs * thr)) total_nobj=$((ndevs * nobj)) - pages=$((rsz / PAGE_SIZE)) - actual_rsz=$((pages * PAGE_SIZE)) + pages=$(( (rsz + PAGE_SIZE_KB - 1) / PAGE_SIZE_KB)) + actual_rsz=$((pages * PAGE_SIZE_KB)) count=$((size * 1024 / (actual_rsz * thr))) actual_size=$((actual_rsz * count * thr)) total_size=$((actual_size * ndevs)) @@ -529,7 +528,7 @@ for ((rsz = $rszlo; rsz <= $rszhi; rsz*=2)); do rm $tmpf if [ $first_obj = "ERROR" ]; then print_summary "created object #s on $client_name not contiguous" - exit 1 + cleanup 3 fi first_objs[$idx]=$first_obj done # $ndevs @@ -539,7 +538,7 @@ for ((rsz = $rszlo; rsz <= $rszhi; rsz*=2)); do declare -a pidarray for host in ${unique_hosts[@]}; do remote_shell $host \ - "lctl set_param -n osd*.*OST*.force_sync 1" + "lctl set_param -n osd*.*.force_sync 1 &>/dev/null || true" echo "starting run for test: $test rsz: $rsz " \ "threads: $thr objects: $nobj" >> ${vmstatf}_${host} done