Fancier logging/reporting
authorVictor Grishchenko (mughal) <victor.grishchenko@gmail.com>
Wed, 17 Feb 2010 13:26:22 +0000 (14:26 +0100)
committerVictor Grishchenko (mughal) <victor.grishchenko@gmail.com>
Wed, 17 Feb 2010 13:26:22 +0000 (14:26 +0100)
mfold/dohrv
mfold/env.default.sh
mfold/loggraphs
mfold/logparse
mfold/logreport
mfold/report.css

index 90afc06..ec170fb 100755 (executable)
@@ -5,7 +5,7 @@
 #   the result is put into harvest/
 #
 if [ ! $SERVERS ]; then
-    SERVERS="servers.txt"
+    export SERVERS="servers.txt"
 fi
 
 rm -rf harvest
@@ -29,7 +29,9 @@ done
 # batch-size is critical for performance
 LC_ALL=C sort -m -s --batch-size=64 harvest/*.fifo | gzip > harvest/swarm.log.gz &
 wait
-./logreport > report.html
+./logreport > harvest/index.html
+
 rm harvest/*.fifo
+cp report.css harvest
 
 echo DONE
index b73b0a0..c402dce 100644 (file)
@@ -3,5 +3,5 @@
 export SEEDER=130.161.211.198
 export SEEDPORT=10004
 export RUNPORT=10008
-export BRANCH=swiftapp
+export BRANCH=master
 export ORIGIN=git://github.com/gritzko/swift.git
index fbe0987..222beea 100755 (executable)
@@ -40,14 +40,15 @@ for from in `grep -v '^#' ../$SERVERS`; do
             echo -ne ", '$OWDLOG' using 1:2 with lines title 'owd' "\
                 "axis x1y1, "\
                 "'$OWDLOG' using 1:3 with lines title 'min owd'"\
+                "axis x1y1, "\
+                "'$OWDLOG' using 1:($2+25000) with lines title 'target'"\
                 "axis x1y1 "\
                 >> $GP
         fi
         echo >> $GP
-        cat $GP | gnuplot &
+        ( cat $GP | gnuplot ) &
     done
 done
 
 wait
 cd ..
-echo DONE
index 3ef9efd..e1fbcb7 100755 (executable)
@@ -135,11 +135,6 @@ for $channel (keys %CHANN) {
         $events{"Rdata"}, $events{"Tdata"},
         $events{"Rdata"}+$events{"Tdata"}, $losses;
 
-    printf HTML
-        "<tr><td colspan='3'><a href='harvest/%s-%s.png'>".
-        "cwnd/data_out/rtt/owd graph</a></td></tr>\n",
-        $SERVER, $host;
-
     print HTML "</table>\n";
     close HTML;
 }
index ed6e639..bafe4c3 100755 (executable)
@@ -1,24 +1,31 @@
 #!/bin/bash
 
-./loggraphs &
+./loggraphs
+
+cd harvest
 
 echo '<html><head>'
 echo '<link rel="stylesheet" href="report.css" type="text/css">'
+echo '<title>Manifold: swarm tomography</title>'
 echo '</head><body>'
 echo '<table id="main"><th>'
-for to in `grep -v '#' servers.txt`; do
+for to in `grep -v '#' ../$SERVERS`; do
     echo '<td class="host">&gt;'$to'</td>'
 done
 echo '</th>'
-for from in `grep -v '#' servers.txt`; do
+for from in `grep -v '#' ../$SERVERS`; do
     echo '<tr><td class="host">'$from'&gt;</td>'
-    for to in `grep -v '#' servers.txt`; do
+    for to in `grep -v '#' ../$SERVERS`; do
         echo '<td>'
-        cat harvest/$from-$to.html
+        cat $from-$to.html
+        PNG="$from-$to.png"
+        if [ -e $PNG ]; then 
+            echo "<a href='$PNG'>"
+            echo "<img class='thumb' src='$PNG'/>"
+            echo "</a>"
+        fi
         echo '</td>'
     done
     echo '</tr>'
 done
 echo '<body></html>'
-
-wait
index 75fb34f..a1a64f7 100644 (file)
@@ -24,3 +24,11 @@ pp {
 tr.bytes {
     background: #fed;
 }
+
+img.thumb {
+    width: 150pt;
+}
+
+table#main tr td {
+    vertical-align: top;
+}