aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/suricata/qa/gnuplot/plot-csv-small-pcap-file.sh
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/suricata/qa/gnuplot/plot-csv-small-pcap-file.sh')
-rwxr-xr-xframework/src/suricata/qa/gnuplot/plot-csv-small-pcap-file.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/framework/src/suricata/qa/gnuplot/plot-csv-small-pcap-file.sh b/framework/src/suricata/qa/gnuplot/plot-csv-small-pcap-file.sh
new file mode 100755
index 00000000..01c5ba10
--- /dev/null
+++ b/framework/src/suricata/qa/gnuplot/plot-csv-small-pcap-file.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+#
+if [ "$1" = "" ]; then
+ echo "call with location of csv file."
+ exit 1;
+fi
+
+DRAW="lines"
+gnuplot << EOF
+set datafile separator ","
+set terminal png size 1024,768
+set output "$1.png"
+set title "$1 ticks"
+set key autotitle columnhead
+set yrange [:]
+set xrange [:]
+set logscale y
+plot "$1" using :4 with $DRAW, \
+ "" using :11 with $DRAW, \
+ "" using :14 with $DRAW, \
+ "" using :15 with $DRAW, \
+ "" using :20 with $DRAW, \
+ "" using :28 with $DRAW, \
+ "" using :32 with $DRAW, \
+ "" using :40 with $DRAW
+EOF
+RESULT=$?
+if [ "$RESULT" = "0" ]; then
+ echo "PNG $1.png written"
+fi