[PATCH] fio: 'directory' option debug kill
[disktools.git] / fio_generate_plots
1 #!/bin/bash
2
3 # Use gnuplot to generate plots from fio run with -l and/or -w
4
5 if [ "$1"x == "x" ]; then
6         echo Need title as arg
7         exit 1
8 fi
9
10 TITLE=$1
11
12 PLOT_LINE=""
13 for i in *bw.log; do
14         if [ "$PLOT_LINE"x != "x" ]; then
15                 PLOT_LINE=$PLOT_LINE", "
16         fi
17
18         PLOT_LINE=$PLOT_LINE"'$i' with lines"
19 done
20
21 if [ "$PLOT_LINE"x == "x" ]; then
22         exit 0
23 fi
24
25 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 -
26
27 PLOT_LINE=""
28 for i in *lat.log; do
29         if [ "$PLOT_LINE"x != "x" ]; then
30                 PLOT_LINE=$PLOT_LINE", "
31         fi
32
33         PLOT_LINE=$PLOT_LINE"'$i' with lines"
34 done
35
36 if [ "$PLOT_LINE"x == "x" ]; then
37         exit 0
38 fi
39
40 echo "set title 'Latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-lat.png'; plot " $PLOT_LINE | gnuplot -