#!/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 'Latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-lat.png'; plot " $PLOT_LINE | gnuplot -