2 export PATH=/sbin:/usr/sbin:$PATH
7 COUNT=${COUNT:-1000000}
8 COUNT_10=`expr $COUNT / 10`
9 COUNT_100=`expr $COUNT / 100`
10 COUNT_1000=`expr $COUNT / 1000`
12 ENDRUN=endrun-`hostname`
14 ECHONAME="`$OBDCTL device_list 2> /dev/null | awk '/ echo_client / { print $4 }' | tail -1`"
16 if [ -z "$ECHONAME" ]; then
17 echo "$0: needs an ECHO_CLIENT set up first" 1>&2
44 $OBDCTL --threads $THR v \$$ECHONAME $DO $CNT $RW $V $PGS $OID || exit 1
46 if [ -e endrun ]; then
48 echo "exiting because endrun file was found"
53 [ -z "$OID" ] && OID=`$OBDCTL --device \\$$ECHONAME create 1 | awk '/is object id/ { print $6 }'`
54 [ -z "$OID" ] && echo "error creating object" 1>&2 && exit 1
56 # TODO: obdctl needs to check on the progress of each forked thread
57 # (IPC SHM, sockets?) to see if it hangs.
58 for CMD in test_getattr test_brw_write test_brw_read; do
74 # We use '--threads 1 X' instead of '--device X' so that
75 # obdctl can monitor the forked thread for progress (TODO).
76 runthreads 1 $CMD 1 1 $PG
77 runthreads 1 $CMD 100 1 $PG
81 runthreads 1 $CMD $COUNT_100 -10 $PG
82 [ "$PGV" ] && runthreads 1 $CMD $COUNT_1000 -10 $PGV
84 runthreads 1 $CMD $COUNT -30 $PG
85 [ "$PGV" ] && runthreads 1 $CMD $COUNT_10 -30 $PGV
87 runthreads 2 $CMD $COUNT_100 -30 $PG
88 [ "$PGV" ] && runthreads 2 $CMD $COUNT_1000 -30 $PGV
90 runthreads 2 $CMD $COUNT -30 $PG
91 [ "$PGV" ] && runthreads 2 $CMD $COUNT_10 -30 $PGV
93 runthreads 10 $CMD $COUNT_10 -30 $PG
94 [ "$PGV" ] && runthreads 10 $CMD $COUNT_100 -30 $PGV
96 runthreads 100 $CMD $COUNT_100 -30 $PG
97 [ "$PGV" ] && runthreads 100 $CMD $COUNT_1000 -30 $PGV
100 $OBDCTL --device \$$ECHONAME destroy $OID