From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from svn.comics.unina.it (unknown [143.225.229.147]) by huchra.bufferbloat.net (Postfix) with ESMTP id 150822006AA for ; Fri, 14 Oct 2011 02:17:17 -0700 (PDT) Received: from www-data by svn.comics.unina.it with local (Exim 4.69) (envelope-from ) id 1REdck-0008Al-Ld for bismark-commits@lists.bufferbloat.net; Fri, 14 Oct 2011 11:00:14 +0200 To: bismark-commits@lists.bufferbloat.net From: walter@svn.comics.unina.it Message-Id: Date: Fri, 14 Oct 2011 11:00:14 +0200 Subject: [Bismark-commits] rev 360 - trunk/mserver/bin trunk/mserver/etc trunk/mserver/scripts trunk/mserver/src trunk/mserver/src/patches X-BeenThere: bismark-commits@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Commit log for the bismark source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 09:17:18 -0000 Author: walter Date: 2011-10-14 11:00:14 +0200 (Fri, 14 Oct 2011) New Revision: 360 Added: trunk/mserver/scripts/setup_common trunk/mserver/src/patches/ trunk/mserver/src/patches/D-ITG-2.8.0-rc1.patch Removed: trunk/mserver/bin/ITGDec trunk/mserver/bin/ITGRecv trunk/mserver/bin/ITGSend Modified: trunk/mserver/bin/probeserver trunk/mserver/etc/mserver.conf trunk/mserver/scripts/daemons trunk/mserver/scripts/itg_dw trunk/mserver/scripts/setup_mlab Log: mserver reorganized Deleted: trunk/mserver/bin/ITGDec =================================================================== (Binary files differ) Deleted: trunk/mserver/bin/ITGRecv =================================================================== (Binary files differ) Deleted: trunk/mserver/bin/ITGSend =================================================================== (Binary files differ) Modified: trunk/mserver/bin/probeserver =================================================================== (Binary files differ) Modified: trunk/mserver/etc/mserver.conf =================================================================== --- trunk/mserver/etc/mserver.conf 2011-09-25 15:33:23 UTC (rev 359) +++ trunk/mserver/etc/mserver.conf 2011-10-14 09:00:14 UTC (rev 360) @@ -1,5 +1,15 @@ # Bismark measurement server configuration +PATH=~/bin:$PATH +# Tools sources +DITG_PKG="D-ITG-2.8.0-rc1" +DITG_URL="http://www.grid.unina.it/software/ITG/codice/$DITG_PKG.tgz" +IPERF_PKG="iperf-2.0.5" +IPERF_URL="http://cdnetworks-us-2.dl.sourceforge.net/project/iperf/$IPERF_PKG.tar.gz" +NETPERF_SVN="http://www.netperf.org/svn/netperf2/trunk" +NETPERF_REV=432 + +# System IFNAME=eth0 # Web server options Modified: trunk/mserver/scripts/daemons =================================================================== --- trunk/mserver/scripts/daemons 2011-09-25 15:33:23 UTC (rev 359) +++ trunk/mserver/scripts/daemons 2011-10-14 09:00:14 UTC (rev 360) @@ -1,4 +1,4 @@ -#!/bin/bashsudo netstat -lntp | grep -q +#!/bin/bash # Script to check/respawn measurement services # Load configuration @@ -10,4 +10,5 @@ pgrep -f TCP-LISTEN:$UPRATE_PORT >/dev/null || ~/scripts/uprate sudo netstat -lntp | grep -q $ITG_UP_PORT.*ITGRecv || ~/scripts/itg_up sudo netstat -lntp | grep -q 55005.*probeserver || ( killall probeserver ; ~/bin/probeserver >> /tmp/spserver.log 2>&1 & ) - +sudo netstat -lntp | grep -q 443.*netserver || ( sudo ~/bin/netserver -p 443 -4 >> /tmp/netserver_443.log 2>&1 & ) +sudo netstat -lntp | grep -q 12865.*netserver || ( ~/bin/netserver >> /tmp/netserver.log 2>&1 & ) Modified: trunk/mserver/scripts/itg_dw =================================================================== --- trunk/mserver/scripts/itg_dw 2011-09-25 15:33:23 UTC (rev 359) +++ trunk/mserver/scripts/itg_dw 2011-10-14 09:00:14 UTC (rev 360) @@ -19,13 +19,16 @@ case $cmd in send) if [ ${opt:0:2} == "-H" ]; then - echo $opt >> /tmp/itg.log - ./ITGSend $opt >> /tmp/itg.log 2>&1 & + id=$(echo $opt | md5sum | cut -c 1-10) + echo "$id start $(date +%s) ($opt)" >> /tmp/itg_dw.log + ~/bin/ITGSend $opt 2>&1 | awk '{ "date +%s" | getline date ; print "'$id' " date " " $0 ; fflush() }' >> /tmp/itg_dw.log & + pid=$(( $! - 1 )) + echo "$id pid $pid" >> /tmp/itg_dw.log fi ;; log) echo $cmd - $opt >> /tmp/itg.log - ./ITGDec $opt -j 1000 $opt.jitter -p 1000 $opt.pktloss -b 1000 $opt.bitrate 2> /dev/null + ~/bin/ITGDec $opt -j 1000 $opt.jitter -p 1000 $opt.pktloss -b 1000 $opt.bitrate 2> /dev/null echo bitrate awk '(NR > 1){ print $3 }' $opt.bitrate echo jitter Copied: trunk/mserver/scripts/setup_common (from rev 334, trunk/mserver/scripts/setup_mlab) =================================================================== --- trunk/mserver/scripts/setup_common (rev 0) +++ trunk/mserver/scripts/setup_common 2011-10-14 09:00:14 UTC (rev 360) @@ -0,0 +1,38 @@ +#!/bin/sh +# BISmark server setup script (Common version) +# +# author: walter.dedonato@unina.it +# last modified on: 10/11/2011 + +# Load configuration +. ~/etc/mserver.conf + +# Download and extract packages +(cd /tmp ; wget "$DITG_URL" ; tar -C ~/src -xzvf $DITG_PKG.tgz ; rm $DITG_PKG.tgz ) +(cd /tmp ; wget "$IPERF_URL" ; tar -C ~/src -xzvf $IPERF_PKG.tar.gz ; rm $IPERF_PKG.tar.gz ) +svn co -r $NETPERF_REV "$NETPERF_SVN" ~/src/netperf + +# Apply patches +( cd ~/src/$DITG_PKG ; patch -p1 < ~/src/patches/$DITG_PKG.patch ) + +# Build binaries +( cd ~/src/netperf; ./configure; make; cp -v src/netserver ~/bin ) +( cd ~/src/$IPERF_PKG; ./configure; make; cp -v src/iperf ~/bin ) +( cd ~/src/$DITG_PKG/src; make multiport=on; cd ~/src/$DITG_PKG/bin ; cp -v ITG{Send,Recv,Dec} ~/bin ) +( cd ~/src/spserver; make ; cp -v probeserver ~/bin ) + +# HTTP stuff (work in progress) +# lighttpd lighttpd-fastcgi php-cli +#echo "cgi.fix_pathinfo = 1" | sudo tee /etc/php.ini +#[ -e /etc/lighttpd/lighttpd.conf.old ] || sudo mv /etc/lighttpd/lighttpd.conf{.old,} +#sudo sed -i.old -f - /etc/lighttpd/lighttpd.conf <<-END +# /"mod_fastcgi"/ s/^#// +# /^server.document-root/ s/^/#/ +# /^#server.document-root/ a server.document-root = "$HOME/www/" +# /^#server.port/ a server.port = $HTTP_PORT +#END +#sudo chmod 777 $HOME +#sudo /etc/init.d/lighttpd start + +# Set cron jobs +crontab ~/etc/crontab Modified: trunk/mserver/scripts/setup_mlab =================================================================== --- trunk/mserver/scripts/setup_mlab 2011-09-25 15:33:23 UTC (rev 359) +++ trunk/mserver/scripts/setup_mlab 2011-10-14 09:00:14 UTC (rev 360) @@ -1,21 +1,13 @@ #!/bin/sh +# BISmark server setup script (M-Lab version) +# +# author: walter.dedonato@unina.it +# last modified on: 10/10/2011 -# Load configuration -. ~/etc/mserver.conf - +# Install dependencies sudo yum -y install socat -# HTTP stuff (work in progress) -# lighttpd lighttpd-fastcgi php-cli -#echo "cgi.fix_pathinfo = 1" | sudo tee /etc/php.ini -#[ -e /etc/lighttpd/lighttpd.conf.old ] || sudo mv /etc/lighttpd/lighttpd.conf{.old,} -#sudo sed -i.old -f - /etc/lighttpd/lighttpd.conf <<-END -# /"mod_fastcgi"/ s/^#// -# /^server.document-root/ s/^/#/ -# /^#server.document-root/ a server.document-root = "$HOME/www/" -# /^#server.port/ a server.port = $HTTP_PORT -#END -#sudo chmod 777 $HOME -#sudo /etc/init.d/lighttpd start +# Start common setup script +~/scripts/setup_common -crontab ~/etc/crontab + Added: trunk/mserver/src/patches/D-ITG-2.8.0-rc1.patch =================================================================== --- trunk/mserver/src/patches/D-ITG-2.8.0-rc1.patch (rev 0) +++ trunk/mserver/src/patches/D-ITG-2.8.0-rc1.patch 2011-10-14 09:00:14 UTC (rev 360) @@ -0,0 +1,34 @@ +diff -aur /tmp/D-ITG-2.8.0-rc1/src/ITGSend/ITGSend.cpp ./src/ITGSend/ITGSend.cpp +--- /tmp/D-ITG-2.8.0-rc1/src/ITGSend/ITGSend.cpp 2011-08-07 07:27:50.000000000 -0400 ++++ ./src/ITGSend/ITGSend.cpp 2011-10-11 07:39:31.000000000 -0400 +@@ -3624,8 +3624,8 @@ + struct addrinfo * TmpAddress=NULL; + int reuse=1; + int newSock=0; +- uint16_t port=0; +- ++ uint16_t port=0; ++ timeval timeout={30,0}; + + + #if defined LINUX_OS && ! defined BSD +@@ -3735,12 +3735,17 @@ + signalSock = socket(SrcHost->ai_family, SOCK_STREAM, 0); + + if (setsockopt(signalSock, SOL_SOCKET, SO_REUSEADDR, (char*)&reuse, sizeof(reuse))<0){ +- perror("Setsockopt in createTransportChan() (Passive Mode)"); ++ perror("Setsockopt reuseaddr in createTransportChan() (Passive Mode)"); + memClean(); + exit(1); + } + +- ++ if (setsockopt(signalSock, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(timeout))<0){ ++ perror("Setsockopt timeout in createTransportChan() (Passive Mode)"); ++ memClean(); ++ exit(1); ++ } ++ + if (bind(signalSock, SrcHost->ai_addr, SrcHost->ai_addrlen) != 0){ + perror("Bind error in createTransportChan() (Passive Mode)"); + memClean();