[PATCH] fio: add 'directory' and 'numjobs' options
[disktools.git] / fio_generate_plots
CommitLineData
9246de7c
JA
1#!/bin/bash
2
3# Use gnuplot to generate plots from fio run with -l and/or -w
4
5if [ "$1"x == "x" ]; then
6 echo Need title as arg
7 exit 1
8fi
9
10TITLE=$1
11
12PLOT_LINE=""
13for 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"
19done
20
21if [ "$PLOT_LINE"x == "x" ]; then
22 exit 0
23fi
24
25echo "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
27PLOT_LINE=""
28for 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"
34done
35
36if [ "$PLOT_LINE"x == "x" ]; then
37 exit 0
38fi
39
00c49370 40echo "set title 'Latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-lat.png'; plot " $PLOT_LINE | gnuplot -