From 800f1c4acf7a8dff4c895e493a018c85d7585598 Mon Sep 17 00:00:00 2001 From: "Victor Grishchenko (mughal)" Date: Wed, 17 Feb 2010 14:26:22 +0100 Subject: [PATCH] Fancier logging/reporting --- mfold/dohrv | 6 ++++-- mfold/env.default.sh | 2 +- mfold/loggraphs | 5 +++-- mfold/logparse | 5 ----- mfold/logreport | 21 ++++++++++++++------- mfold/report.css | 8 ++++++++ 6 files changed, 30 insertions(+), 17 deletions(-) diff --git a/mfold/dohrv b/mfold/dohrv index 90afc06..ec170fb 100755 --- a/mfold/dohrv +++ b/mfold/dohrv @@ -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 diff --git a/mfold/env.default.sh b/mfold/env.default.sh index b73b0a0..c402dce 100644 --- a/mfold/env.default.sh +++ b/mfold/env.default.sh @@ -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 diff --git a/mfold/loggraphs b/mfold/loggraphs index fbe0987..222beea 100755 --- a/mfold/loggraphs +++ b/mfold/loggraphs @@ -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 diff --git a/mfold/logparse b/mfold/logparse index 3ef9efd..e1fbcb7 100755 --- a/mfold/logparse +++ b/mfold/logparse @@ -135,11 +135,6 @@ for $channel (keys %CHANN) { $events{"Rdata"}, $events{"Tdata"}, $events{"Rdata"}+$events{"Tdata"}, $losses; - printf HTML - "". - "cwnd/data_out/rtt/owd graph\n", - $SERVER, $host; - print HTML "\n"; close HTML; } diff --git a/mfold/logreport b/mfold/logreport index ed6e639..bafe4c3 100755 --- a/mfold/logreport +++ b/mfold/logreport @@ -1,24 +1,31 @@ #!/bin/bash -./loggraphs & +./loggraphs + +cd harvest echo '' echo '' +echo 'Manifold: swarm tomography' echo '' echo '' done echo '' -for from in `grep -v '#' servers.txt`; do +for from in `grep -v '#' ../$SERVERS`; do echo '' - for to in `grep -v '#' servers.txt`; do + for to in `grep -v '#' ../$SERVERS`; do echo '' done echo '' done echo '' - -wait diff --git a/mfold/report.css b/mfold/report.css index 75fb34f..a1a64f7 100644 --- a/mfold/report.css +++ b/mfold/report.css @@ -24,3 +24,11 @@ pp { tr.bytes { background: #fed; } + +img.thumb { + width: 150pt; +} + +table#main tr td { + vertical-align: top; +} -- 2.20.1
' -for to in `grep -v '#' servers.txt`; do +for to in `grep -v '#' ../$SERVERS`; do echo '>'$to'
'$from'>' - cat harvest/$from-$to.html + cat $from-$to.html + PNG="$from-$to.png" + if [ -e $PNG ]; then + echo "" + echo "" + echo "" + fi echo '