/usr/bin/fio_generate_plots is in fio 1.59-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | #! /bin/sh
# Use gnuplot to generate plots from fio run with -l and/or -w
if [ "$1"x = "x" ]; then
echo "Usage: fio_generate_plots title [xres yres]"
exit 1
fi
GNUPLOT=$(which gnuplot)
if [ ! -x $GNUPLOT ]; then
echo You need gnuplot installed to generate graphs
exit 1
fi
TITLE=$1
# set resolution
if [ "$2"x != "x" -a "$3"x != "x" ]; then
XRES="$2"
YRES="$3"
else
XRES=1024
YRES=768
fi
PLOT_LINE=""
for i in *bw.log; do
if [ ! -r $i ]; then
continue
fi
PT=$(echo $i | sed s/_bw.log//g)
if [ "$PLOT_LINE"x != "x" ]; then
PLOT_LINE=$PLOT_LINE", "
fi
PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
done
if [ "$PLOT_LINE"x != "x" ]; then
echo Making bw logs
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 -
fi
PLOT_LINE=""
for i in *slat.log; do
if [ ! -r $i ]; then
continue
fi
PT=$(echo $i | sed s/_slat.log//g)
if [ "$PLOT_LINE"x != "x" ]; then
PLOT_LINE=$PLOT_LINE", "
fi
PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
done
if [ "$PLOT_LINE"x != "x" ]; then
echo Making slat logs $PLOT_LINE
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 -
fi
PLOT_LINE=""
for i in *clat.log; do
if [ ! -r $i ]; then
continue
fi
PT=$(echo $i | sed s/_clat.log//g)
if [ "$PLOT_LINE"x != "x" ]; then
PLOT_LINE=$PLOT_LINE", "
fi
PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
done
if [ "$PLOT_LINE"x != "x" ]; then
echo Making clat logs $PLOT_LINE
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 -
fi
PLOT_LINE=""
for i in *_lat.log; do
if [ ! -r $i ]; then
continue
fi
PT=$(echo $i | sed s/_lat.log//g)
if [ "$PLOT_LINE"x != "x" ]; then
PLOT_LINE=$PLOT_LINE", "
fi
PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
done
if [ "$PLOT_LINE"x != "x" ]; then
echo Making lat logs $PLOT_LINE
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 -
fi
|