From: Victor Grishchenko (mughal) Date: Mon, 15 Feb 2010 14:35:15 +0000 (+0100) Subject: Manifold reports got graphs. X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=b0ce088b43158dd29ab66c11f7277f2c4ee2cbf8;p=swift-upb.git Manifold reports got graphs. Powered by Gnuplot! --- diff --git a/mfold/build.default.sh b/mfold/build.default.sh index a2fb0f9..33e6319 100644 --- a/mfold/build.default.sh +++ b/mfold/build.default.sh @@ -5,6 +5,7 @@ if ! which git || ! which g++ || ! which scons || ! which make ; then fi if [ ! -e ~/include/gtest/gtest.h ]; then + echo installing gtest mkdir tmp cd tmp || exit -3 wget -c http://googletest.googlecode.com/files/gtest-1.4.0.tar.bz2 || exit -2 @@ -14,14 +15,34 @@ if [ ! -e ~/include/gtest/gtest.h ]; then ./configure --prefix=$HOME || exit 2 make || exit 3 make install || exit 4 + echo done gtest fi +#if ! which pcregrep ; then +# echo installing pcregrep +# mkdir tmp +# cd tmp +# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.gz || exit 5 +# tar -xzf pcre-8.01.tar.gz +# cd pcre-8.01 +# ./configure --prefix=$HOME || exit 6 +# make -j4 || exit 7 +# make install || exit 8 +# echo done pcregrep +#fi + if [ ! -e swift ]; then - git clone git://github.com/gritzko/swift.git || exit 6 + echo clone the repo + git clone $ORIGIN || exit 6 fi cd swift -git pull || exit 5 +echo pulling updates +git pull origin $BRANCH:$BRANCH || exit 5 +echo switching the branch +git checkout $BRANCH || exit 5 +echo building CPPPATH=~/include LIBPATH=~/lib scons -j4 || exit 7 +echo testing tests/connecttest || exit 8 - +echo done diff --git a/mfold/doall b/mfold/doall index 1f5b82c..5c029bf 100755 --- a/mfold/doall +++ b/mfold/doall @@ -5,8 +5,9 @@ # docmd.sh); all failed executions are # put to the FAILURES file rm -f FAILURES -rm -rf logs -mkdir logs +if [ ! -d logs ]; then + mkdir logs +fi if [ -z "$SERVERS" ]; then SERVERS="servers.txt" diff --git a/mfold/env.default.sh b/mfold/env.default.sh index c358977..b73b0a0 100644 --- a/mfold/env.default.sh +++ b/mfold/env.default.sh @@ -1,5 +1,7 @@ # This script sets up shared environment variables # at the servers -export SEEDER=#YOUR IP HERE# -export SEEDPORT=10001 -export RUNPORT=10002 +export SEEDER=130.161.211.198 +export SEEDPORT=10004 +export RUNPORT=10008 +export BRANCH=swiftapp +export ORIGIN=git://github.com/gritzko/swift.git diff --git a/mfold/loggraphs b/mfold/loggraphs new file mode 100755 index 0000000..fbe0987 --- /dev/null +++ b/mfold/loggraphs @@ -0,0 +1,53 @@ +#!/bin/bash + +if [ -z "$SERVERS" ]; then + SERVERS="servers.txt" +fi + +cd harvest + +for from in `grep -v '^#' ../$SERVERS`; do + for to in `grep -v '^#' ../$SERVERS`; do + CWNDLOG="$from-$to-cwnd.log" + if [ ! -e $CWNDLOG ]; then + continue + fi + GP="$from-$to.gnuplot" + echo "set term png large size 1024,768" > $GP + PNG="$from-$to.png" + if [ -e $PNG ]; then rm $PNG; fi + echo "set out '$from-$to.png'" >> $GP + echo "set y2tics" >> $GP + echo "set y2label 'packets'" >> $GP + echo "set ylabel 'microseconds'" >> $GP + echo "set xlabel 'run time millis'" >> $GP + CWNDLOG="$from-$to-cwnd.log" + echo -ne "plot '$CWNDLOG' using 1:2 with lines title 'cwnd'"\ + " axis x1y2, "\ + " '$CWNDLOG' using 1:3 with lines title 'data out'"\ + " axis x1y2 "\ + >> $GP + RTTLOG="$from-$to-rtt.log" + if [ -e $RTTLOG ]; then + echo -ne ", '$RTTLOG' using 1:2 with lines title 'rtt' "\ + "axis x1y1, "\ + "'$RTTLOG' using 1:3 with lines title 'dev' "\ + "axis x1y1"\ + >> $GP + fi + OWDLOG="$from-$to-owd.log" + if [ -e $OWDLOG ]; then + echo -ne ", '$OWDLOG' using 1:2 with lines title 'owd' "\ + "axis x1y1, "\ + "'$OWDLOG' using 1:3 with lines title 'min owd'"\ + "axis x1y1 "\ + >> $GP + fi + echo >> $GP + cat $GP | gnuplot & + done +done + +wait +cd .. +echo DONE diff --git a/mfold/logparse b/mfold/logparse index a7ad779..3ef9efd 100755 --- a/mfold/logparse +++ b/mfold/logparse @@ -8,6 +8,9 @@ $SERVER=shift; %RCVD = (); %DSENT = (); %DRCVD = (); +%CWNDLOG = (); +%RTTLOG = (); +%OWDLOG = (); $SENTB = 0; $RCVDB = 0; @@ -19,13 +22,15 @@ while () { close SRV; while (<>) { - /([\d\_]+) (#\d+) (\S+) (.*)/ or next; + /(\d+_\d+_\d+_\d+_\d+) (#\d+) (\S+) (.*)/ or next; my $time = $1; my $channel = $2; my $event = $3; my $rest = $4; my $host = $CHANN{"$channel"}; $host = "unknown" if not $host; + $time =~ /^(\d+)_(\d+)_(\d+)_(\d+)/; + my $ms=$1*60; $ms=($ms+$2)*60; $ms=($ms+$3)*1000; $ms+=$4; if ($event eq "sent") { $rest =~ /(\d+)b ([\d\.]+):/; $ip = $2; @@ -41,6 +46,26 @@ while (<>) { $DRCVD{$host}++; $RCVD{$host} += $1; $RCVDB += $1; + } elsif ($event eq "sendctrl") { + if ($rest =~ /cwnd (\d+\.\d+).*data_out (\d+)/) { + if (not exists $CWNDLOG{$host}) { + open(my $handle, '>', "harvest/$SERVER-$host-cwnd.log") or die; + $CWNDLOG{$host} = $handle; + } + print {$CWNDLOG{$host}} "$ms\t$1\t$2\n"; + } elsif ($rest =~ /ledbat (\-?\d+)\-(\-?\d+)/) { + if (not exists $OWDLOG{$host}) { + open(my $handle, '>', "harvest/$SERVER-$host-owd.log") or die; + $OWDLOG{$host} = $handle; + } + print {$OWDLOG{$host}} "$ms\t$1\t$2\n"; + } elsif ($rest =~ /rtt (\d+) dev (\d+)/) { + if (not exists $RTTLOG{$host}) { + open(my $handle, '>', "harvest/$SERVER-$host-rtt.log") or die; + $RTTLOG{$host} = $handle; + } + print {$RTTLOG{$host}} "$ms\t$1\t$2\n"; + } } $EVENTS{"$host"} = { "+hs"=>0 } if not exists $EVENTS{"$host"}; @@ -52,8 +77,20 @@ while (<>) { } +for $host (keys %CWNDLOG) { + close($CWNDLOG{$host}); +} +for $host (keys %OWDLOG) { + close ($OWDLOG{$host}); +} +for $host (keys %RTTLOG) { + close ($RTTLOG{$host}); +} +open(LEGEND,"> harvest/$SERVER-legend.txt") or die; + for $channel (keys %CHANN) { my $host = $CHANN{"$channel"}; + print LEGEND "$channel\t$host\n"; open(STATS,"> harvest/$SERVER-$host.stat") or die; my %events = %{ $EVENTS{"$host"} }; for $event ( keys %events ) { @@ -98,6 +135,12 @@ 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; } +close LEGEND; diff --git a/mfold/logreport b/mfold/logreport index a1b8138..ed6e639 100755 --- a/mfold/logreport +++ b/mfold/logreport @@ -1,5 +1,7 @@ #!/bin/bash +./loggraphs & + echo '' echo '' echo '' @@ -18,3 +20,5 @@ for from in `grep -v '#' servers.txt`; do echo '' done echo '' + +wait