SRCDIR="`dirname $0`/"
. $SRCDIR/common.sh
+OSCDEV="`device_list 2> /dev/null | awk '/ UP osc / { print $4 }'`"
+
+if [ -z "$OSCDEV" ]; then
+ echo "$0: needs an OSC set up first" 1>&2
+ exit 1
+fi
+
runthreads() {
THR=$1
DO=$2
;;
esac
- $OBDCTL --threads $THR v '$OSCDEV' $DO $CNT $RW $V $PGS $OID || exit 1
+ $OBDCTL --threads $THR v \$$OSCDEV $DO $CNT $RW $V $PGS $OID || exit 1
if [ -e endrun ]; then
rm endrun
fi
}
-if [ -z "`$OBDCTL device_list 2> /dev/null | grep osc`" ]; then
- setup_opts $@
-
- setup_portals
- setup_lustre
-
- setup_server || exit -1
- setup_client || exit -1
-fi
-
-[ -z "$OID" ] && OID=`$OBDCTL --device '$OSCDEV' create 1 | awk '/is object id/ { print $6 }'`
+[ -z "$OID" ] && OID=`$OBDCTL --device \$$OSCDEV create 1 | awk '/is object id/ { print $6 }'`
[ -z "$OID" ] && echo "error creating object" 1>&2 && exit 1
# TODO: obdctl needs to check on the progress of each forked thread
while date; do
PG=1
PGVW=16
- case $OSTNODE in
- ba*) PGVR= ;; # disabled until the BA OST code is updated
- *) PGVR=16 ;;
- esac
+ PGVR=16
# We use '--threads 1 X' instead of '--device X' so that
# obdctl can monitor the forked thread for progress (TODO).
[ "$PGVR" ] && runthreads 100 test_brw_read 100000 -60 $PGVR
done
-$OBDCTL --device '$OSCDEV' destroy $OID
-
-cleanup_client || exit -1
-cleanup_server || exit -1
-cleanup_lustre
-cleanup_portals
+$OBDCTL --device \$$OSCDEV destroy $OID
SRCDIR="`dirname $0`/"
. $SRCDIR/common.sh
-setup_opts $@
+OSCDEV="`device_list 2> /dev/null | awk '/ osc | lov / { print $4 }' | tail -1`"
-setup_portals
-setup_lustre
+if [ -z "$OSCDEV" ]; then
+ echo "$0: needs an OSC set up first" 1>&2
+ exit 1
+fi
runthreads() {
THR=$1
;;
esac
- $OBDCTL --threads $THR v '$OSCDEV' $DO $CNT $RW $V $PGS $OID || exit 1
+ $OBDCTL --threads $THR v \$$OSCDEV $DO $CNT $RW $V $PGS $OID || exit 1
if [ -e endrun ]; then
rm endrun
fi
}
-setup_server || exit -1
-setup_client || exit -1
-
-OID=`$OBDCTL --device '$OSCDEV' create 1 | awk '/is object id/ { print $6 }'`
+OID=`$OBDCTL --device \$$OSCDEV create 1 | awk '/is object id/ { print $6 }'`
# TODO: obdctl needs to check on the progress of each forked thread
# (IPC SHM, sockets?) to see if it hangs.
runthreads 1 $CMD 1000000 -30 $PG
[ "$PGV" ] && runthreads 1 $CMD 100000 -30 $PGV
- debug_server_on
- debug_client_on
runthreads 1 $CMD 100 1 $PG
- debug_server_off
- debug_client_off
runthreads 2 $CMD 10000 100 $PG
[ "$PGV" ] && runthreads 2 $CMD 1000 100 $PGV
runthreads 100 $CMD 10000 -30 $PG
done
-$OBDCTL --device '$OSCDEV' destroy $OID
-
-cleanup_client || exit -1
-cleanup_server || exit -1
-cleanup_lustre
-cleanup_portals
+$OBDCTL --device \$$OSCDEV destroy $OID