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

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

Revision 1.8, Tue Jun 29 02:16:00 2004 UTC (13 years, 4 months ago) by fsgqa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +6 -0 lines

Fixed bench marking of other filesystems.
Added error message if bonnie++ is not installed.

##/bin/sh

#check bonnie is installed
if [ "`whereis bonnie++`" == "bonnie++:"]; then
        echo $0 error bonnie not installed.
        exit
fi

run_bonnie()
{
	# dir, no hostname, quiet, fast (no per-char), ram (no sz checks)
	tmp=/var/tmp

	mkdir ./bonnie || exit 1
	defaults="-d ./bonnie -q -f -r 0"
	defaults="$defaults -u "`id -u`" -g "`id -g`
	bonnie++ -m '' $defaults $@ >$tmp/$$.bonnie.stdout 2>$tmp/$$.bonnie.stderr
	status=$?
	rm -fr ./bonnie
	[ $status -ne 0 ] && exit 1
	filter_stdout < $tmp/$$.bonnie.stdout
	filter_stderr < $tmp/$$.bonnie.stderr 1>&2
	rm -f $tmp/$$.bonnie.stdout $tmp/$$.bonnie.stderr
	exit 0
}