From: zab Date: Fri, 10 Oct 2003 19:54:32 +0000 (+0000) Subject: - teach the filter survey script to collect vmstat and oprofile results X-Git-Tag: v1_7_0_51~2^7~420 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8fa548d8e3afb955a793b25a8b252f4ba8575b86;p=fs%2Flustre-release.git - teach the filter survey script to collect vmstat and oprofile results --- diff --git a/lustre/tests/filter_survey.sh b/lustre/tests/filter_survey.sh index e05f41e..bc1b82d 100644 --- a/lustre/tests/filter_survey.sh +++ b/lustre/tests/filter_survey.sh @@ -83,6 +83,21 @@ EOF sep4="$sep4||" done + +doit() { + $* +} +nop() { + local nothing; +} +if which opcontrol; then + echo generating oprofile results + oprofile=doit +else + echo not using oprofile + oprofile=nop +fi + tmp_dir=`mktemp -d /tmp/echo_client_survey_XXXXXX` || die "mktemp failed" TOT_PAGES=${TOT_PAGES:-524288} @@ -150,6 +165,15 @@ for order_threads in `seq 0 3`; do for a in 1 2; do total_maxtime="0.0" pids="" + + $oprofile opcontrol --start + + echo 'nice -19 vmstat 5' > $tmp_dir/vmstat-log + nice -19 vmstat 5 >> $tmp_dir/vmstat-log & + vmstat_pid="$!" + + $oprofile opcontrol --reset + # start a test_brw thread in the background # for each given filter for i in `seq 0 $last_filter`; do @@ -159,9 +183,18 @@ for order_threads in `seq 0 3`; do tee $tmp_dir/$i & pids="$pids $!" done + echo ------ waiting for $nthreads obj per thread $obj_per_thread rw: $a ---- for p in $pids; do wait $p done + $oprofile opcontrol --shutdown + echo ------ finished $nthreads obj per thread $obj_per_thread rw: $a ---- + kill $vmstat_pid + cat $tmp_dir/vmstat-log + rm $tmp_dir/vmstat-log + + $oprofile opreport + $oprofile opreport -c -l for t in `seq 1 $nthreads`; do thread_row[$t]="${thread_row[$t]} ||"