3 # Copyright (c) 2002-2004 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it would be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write the Free Software Foundation,
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #check bonnie is installed
20 if [ "`whereis bonnie++`" == "bonnie++:"]; then
21 echo $0 error bonnie not installed.
27 # dir, no hostname, quiet, fast (no per-char), ram (no sz checks)
30 mkdir ./bonnie || exit 1
31 defaults="-d ./bonnie -q -f -r 0"
32 defaults="$defaults -u "`id -u`" -g "`id -g`
33 bonnie++ -m '' $defaults $@ >$tmp/$$.bonnie.stdout 2>$tmp/$$.bonnie.stderr
36 [ $status -ne 0 ] && exit 1
37 filter_stdout < $tmp/$$.bonnie.stdout
38 filter_stderr < $tmp/$$.bonnie.stderr 1>&2
39 rm -f $tmp/$$.bonnie.stdout $tmp/$$.bonnie.stderr