2 export PATH=/sbin:/usr/sbin:$PATH
7 ENDRUN=endrun-`hostname`
9 OSCNAME="`$OBDCTL device_list 2> /dev/null | awk '/ UP osc / { print $4 }'`"
11 if [ -z "$OSCNAME" ]; then
12 echo "$0: needs an OSC set up first" 1>&2
38 $OBDCTL --threads $THR v \$$OSCNAME $DO $CNT $RW $V $PGS $OID || exit 1
40 if [ -e $ENDRUN ]; then
42 echo "exiting because $ENDRUN file was found"
47 [ -z "$OID" ] && OID=`$OBDCTL --device \\$$OSCNAME create 1 | awk '/is object id/ { print $6 }'`
48 [ -z "$OID" ] && echo "error creating object" 1>&2 && exit 1
50 # TODO: obdctl needs to check on the progress of each forked thread
51 # (IPC SHM, sockets?) to see if it hangs.
57 # We use '--threads 1 X' instead of '--device X' so that
58 # obdctl can monitor the forked thread for progress (TODO).
61 runthreads 1 test_brw_write 1000 -30 $PG
62 runthreads 1 test_brw_read 1000 -30 $PG
64 [ "$PGVW" ] && runthreads 1 test_brw_write 100 -30 $PGVW
65 [ "$PGVW" ] && runthreads 1 test_brw_read 1600 -30 $PG
66 [ "$PGVR" ] && runthreads 1 test_brw_read 100 -30 $PGVR
68 runthreads 1 test_brw_write 10000000 -30 $PG
69 runthreads 1 test_brw_read 10000000 -30 $PG
71 [ "$PGVW" ] && runthreads 1 test_brw_write 1000000 -30 $PGVW
72 [ "$PGVR" ] && runthreads 1 test_brw_read 1000000 -30 $PGVR
74 runthreads 2 test_brw_write 10000000 -30 $PG
75 runthreads 2 test_brw_read 10000000 -30 $PG
77 [ "$PGVW" ] && runthreads 2 test_brw_write 1000000 -30 $PGVW
78 [ "$PGVR" ] && runthreads 2 test_brw_read 1000000 -30 $PGVR
80 runthreads 10 test_brw_write 1000000 -30 $PG
81 runthreads 10 test_brw_read 1000000 -30 $PG
83 [ "$PGVW" ] && runthreads 10 test_brw_write 100000 -60 $PGVW
84 [ "$PGVR" ] && runthreads 10 test_brw_read 100000 -60 $PGVR
86 runthreads 32 test_brw_write 1000000 -30 $PG
87 runthreads 32 test_brw_read 1000000 -30 $PG
89 [ "$PGVW" ] && runthreads 32 test_brw_write 100000 -60 $PGVW
90 [ "$PGVR" ] && runthreads 32 test_brw_read 100000 -60 $PGVR
92 runthreads 64 test_brw_write 1000000 -30 $PG
93 runthreads 64 test_brw_read 1000000 -30 $PG
95 [ "$PGVW" ] && runthreads 64 test_brw_write 100000 -60 $PGVW
96 [ "$PGVR" ] && runthreads 64 test_brw_read 100000 -60 $PGVR
98 runthreads 100 test_brw_write 100000 -60 $PG
99 runthreads 100 test_brw_read 100000 -60 $PG
101 [ "$PGVW" ] && runthreads 100 test_brw_write 100000 -60 $PGVW
102 [ "$PGVR" ] && runthreads 100 test_brw_read 100000 -60 $PGVR
105 $OBDCTL --device \$$OSCNAME destroy $OID