[BACK]Return to common.dbench CVS log [TXT][DIR] Up to [Development] / xfs-cmds / xfstests

File: [Development] / xfs-cmds / xfstests / common.dbench (download)

Revision 1.1, Thu Nov 7 05:42:19 2002 UTC (14 years, 11 months ago) by fsgqa
Branch: MAIN
CVS Tags: XFS-1_3_0pre1

Crank up dbench, now that everything seems to be quite stable under load.
We now do 1, 10, 50, and 100 client runs each night.
A generic dbench running script, derived from the old run.dbench.

#!/bin/sh
# 
# Does a dbench run (10 clients if $DBENCH_CLIENTS is not set),
# then massages the output into CSV format.
# 
DBENCH_CLIENTS=${DBENCH_CLIENTS:=10}

run_dbench()
{
	mkdir ./dbench || exit 1
	cd dbench
	dbench $DBENCH_CLIENTS
	status=$?
	cd ..
	rm -fr ./dbench
	[ $status -ne 0 ] && exit 1
}

# 
# Sample dbench output:
# "Throughput 40.6701 MB/sec (NB=50.8376 MB/sec  406.701 MBit/sec)"
# 
if [ $# -gt 0 ]; then
	echo "clients,MB/sec"
	exit 0
fi
run_dbench | awk 'END { printf "%u,%s\n", '$DBENCH_CLIENTS', $2 }'