Whamcloud - gitweb
conf-sanity: don't start/stop lsvcgssd/lgssd frequently.
[fs/lustre-release.git] / lustre / tests / rundbench
index 0f6b66d..821ac46 100755 (executable)
@@ -1,6 +1,13 @@
 #!/bin/sh
-
-[ -e /proc/sys/portals/debug ] && echo 0 > /proc/sys/portals/debug 
-cd /mnt/lustre
-cp /usr/src/obd/demos/dbench/client.txt .
-/usr/src/obd/demos/dbench/dbench $1
+MNT=${MNT:-/mnt/lustre}
+DIR=${DIR:-$MNT/`hostname`}
+#[ -e /proc/sys/portals/debug ] && echo 0 > /proc/sys/portals/debug 
+mkdir -p $DIR
+TGT=$DIR/client.txt
+SRC=${SRC:-/usr/lib/dbench/client.txt}
+[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
+SRC=/usr/lib/dbench/client_plain.txt
+[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
+cd $DIR
+echo "running 'dbench $@' on $PWD at `date`"
+dbench -c client.txt $@