3 # Use gnuplot to generate plots from fio run with -l and/or -w
5 if [ "$1"x = "x" ]; then
6 echo "Usage: fio_generate_plots title [xres yres]"
10 GNUPLOT=$(which gnuplot)
11 if [ ! -x $GNUPLOT ]; then
12 echo You need gnuplot installed to generate graphs
19 if [ "$2"x != "x" -a "$3"x != "x" ]; then
32 PT=$(echo $i | sed s/_bw.log//g)
33 if [ "$PLOT_LINE"x != "x" ]; then
34 PLOT_LINE=$PLOT_LINE", "
37 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
40 if [ "$PLOT_LINE"x != "x" ]; then
42 echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KB/sec'; set terminal png size $XRES,$YRES; set output '$TITLE-bw.png'; plot " $PLOT_LINE | $GNUPLOT -
46 for i in *slat.log; do
50 PT=$(echo $i | sed s/_slat.log//g)
51 if [ "$PLOT_LINE"x != "x" ]; then
52 PLOT_LINE=$PLOT_LINE", "
55 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
58 if [ "$PLOT_LINE"x != "x" ]; then
59 echo Making slat logs $PLOT_LINE
60 echo "set title 'Submission latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png size $XRES,$YRES; set output '$TITLE-slat.png'; plot " $PLOT_LINE | $GNUPLOT -
64 for i in *clat.log; do
68 PT=$(echo $i | sed s/_clat.log//g)
69 if [ "$PLOT_LINE"x != "x" ]; then
70 PLOT_LINE=$PLOT_LINE", "
73 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
76 if [ "$PLOT_LINE"x != "x" ]; then
77 echo Making clat logs $PLOT_LINE
78 echo "set title 'Completion latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png size $XRES,$YRES; set output '$TITLE-clat.png'; plot " $PLOT_LINE | $GNUPLOT -
82 for i in *_lat.log; do
86 PT=$(echo $i | sed s/_lat.log//g)
87 if [ "$PLOT_LINE"x != "x" ]; then
88 PLOT_LINE=$PLOT_LINE", "
91 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
94 if [ "$PLOT_LINE"x != "x" ]; then
95 echo Making lat logs $PLOT_LINE
96 echo "set title 'Latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png size $XRES,$YRES; set output '$TITLE-lat.png'; plot " $PLOT_LINE | $GNUPLOT -