create gnuplot graphs based on http://oss.lzu.edu.cn/blog/article.php?tid_1204.html
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 25 May 2009 22:27:09 +0000 (22:27 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 25 May 2009 22:27:09 +0000 (22:27 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@102 191e9f34-6774-4a6d-acfc-7664dacd4a2a

recepies/netpipe-tcp/Makefile
recepies/netpipe-tcp/gnuplot.sh [new file with mode: 0755]

index a6ba3d9..183e321 100644 (file)
@@ -1,2 +1,5 @@
 graph:
        ./np2graphviz.pl | dot -Tpng -o graph.png && qiv graph.png
+
+gnuplot:
+       ls */*.np | xargs -i ./gnuplot.sh {}
diff --git a/recepies/netpipe-tcp/gnuplot.sh b/recepies/netpipe-tcp/gnuplot.sh
new file mode 100755 (executable)
index 0000000..5f569fe
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+echo "creating $1.png"
+
+cat << __gnuplot__ | gnuplot
+set term png
+set output "$1.png"
+
+set grid
+
+set ylabel "Throughput In Mbps"
+set xlabel "Message Size"
+
+set size 1,0.8 
+
+plot "$1" using 1:2 title "$1" with lines linewidth 3 
+__gnuplot__