Using blktrace and blkparse in the "standard" piped setup is a little
cumbersome and not very intuitive, so add a script to do this automatically.
This is what users would expect.
--- /dev/null
+#!/bin/sh
+# Copyright (c) 2005 Silicon Graphics, Inc.
+# All rights reserved.
+#
+# Nathan Scott <nathans@sgi.com>
+# 14 Sep 2005 Initial version
+#
+
+TRACEOPTS=""
+PARSEOPTS=""
+USAGE="Usage: btrace [-s] [-t] [-a <trace>...] <dev>..."
+DIRNAME=`dirname $0`
+
+while getopts "a:st" c
+do
+ case $c in
+ a) TRACEOPTS=$TRACEOPTS" -a "$OPTARG" ";;
+ s) PARSEOPTS=$PARSEOPTS" -s";;
+ t) PARSEOPTS=$PARSEOPTS" -t";;
+ \?) echo $USAGE 1>&2
+ exit 2
+ ;;
+ esac
+done
+
+shift `expr $OPTIND - 1`
+if [ $# -eq 0 ]; then
+ echo $USAGE 1>&2
+ exit 2
+fi
+
+${DIRNAME}/blktrace ${TRACEOPTS} -o- $@ | ${DIRNAME}/blkparse ${PARSEOPTS} -i-