[PATCH] fio: add script for generating gnuplot png's from the data
authorJens Axboe <axboe@suse.de>
Wed, 26 Oct 2005 09:20:36 +0000 (11:20 +0200)
committerJens Axboe <axboe@suse.de>
Wed, 26 Oct 2005 09:20:36 +0000 (11:20 +0200)
generate_fio_plots [new file with mode: 0755]

diff --git a/generate_fio_plots b/generate_fio_plots
new file mode 100755 (executable)
index 0000000..c8e02cd
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Use gnuplot to generate plots from fio run with -l and/or -w
+
+if [ "$1"x == "x" ]; then
+       echo Need title as arg
+       exit 1
+fi
+
+TITLE=$1
+
+PLOT_LINE=""
+for i in *bw.log; do
+       if [ "$PLOT_LINE"x != "x" ]; then
+               PLOT_LINE=$PLOT_LINE", "
+       fi
+
+       PLOT_LINE=$PLOT_LINE"'$i' with lines"
+done
+
+if [ "$PLOT_LINE"x == "x" ]; then
+       exit 0
+fi
+
+echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KiB/sec'; set terminal png; set output '$TITLE-bw.png'; plot " $PLOT_LINE | gnuplot -
+
+PLOT_LINE=""
+for i in *lat.log; do
+       if [ "$PLOT_LINE"x != "x" ]; then
+               PLOT_LINE=$PLOT_LINE", "
+       fi
+
+       PLOT_LINE=$PLOT_LINE"'$i' with lines"
+done
+
+if [ "$PLOT_LINE"x == "x" ]; then
+       exit 0
+fi
+
+echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KiB/sec'; set terminal png; set output '$TITLE-lat.png'; plot " $PLOT_LINE | gnuplot -