Tuning: better SQL, better output.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 6 Jan 2016 22:14:05 +0000 (23:14 +0100)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 6 Jan 2016 22:14:05 +0000 (23:14 +0100)
HOWTO.sh
chroust.py
nodes-sum.dem

index dc9d992..8d63966 100755 (executable)
--- a/HOWTO.sh
+++ b/HOWTO.sh
@@ -1,4 +1,7 @@
 # !/bin/sh
+#scp -p root@hador-c1:~/STAT-nodes/nodes.dat .
 ./chroust.py -i $((6*3600)) -c hador.txt > nodes.dat
 ./nodes.dem
 ./nodes-sum.dem
+
+term_x=800; term_y=500; gnuplot -e "set term pngcairo size ${term_x}, ${term_y}"  nodes-sum.dem > nodes-sum.png
index af93919..747939f 100755 (executable)
@@ -137,7 +137,7 @@ i = min
 while i < max:
        start = i
        end = i + 1000 * interval
-       st.execute('SELECT * FROM subjobs WHERE finish >= %s AND start <= %s', (start, end))
+       st.execute('SELECT * FROM subjobs WHERE (finish >= %s OR finish = 0 OR finish IS NULL) AND start <= %s', (start, end))
        #print '%s: %d subjobs' % (strp(i), st.rowcount)
        subjobs = st.rowcount
        nodes_usage = dict()
index 5e1b699..bf234a4 100755 (executable)
@@ -1,9 +1,11 @@
 #! /usr/bin/gnuplot -p
 
+set title "Hadoop: Map/Reduce Jobs Summary" font ',16'
 set xdata time
 set timefmt "%Y-%m-%d %H:%M:%S"
 set format x "%Y-%m-%d"
 
 set xtics rotate by -20
 
-plot for [i=3:26] 'nodes.dat' using 1:(sum [col=4:i+1] column(col)) notitle with lines
+#plot for [i=3:25]  'nodes.dat' using 1:(sum [col=4:i+1] column(col)) with lines notitle
+plot for [i=26:26] 'nodes.dat' using 1:(sum [col=4:i+1] column(col)) with lines title 'jobs (max 384)'