Skip to content

Commit

Permalink
port info for netperf and ditg obtained from $info
Browse files Browse the repository at this point in the history
  • Loading branch information
ssundaresan committed Mar 3, 2012
1 parent e786c99 commit 9dfcdaf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions device/OpenWrt_common/scripts/bismark-measure-active
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if [ ! -e /tmp/bismark/var/mlock ]; then
sleep $wait
dir="dw"
( sleep 3 ; "$BROOT"/usr/bin/bismark-ping $dst | "$BROOT"/usr/bin/bismark-mstats ULRTTDW PING $src $dst $dir >> $XML_FILE ) &
"$BROOT"/usr/bin/bismark-netperf $BR_DW_DURATION $NTHREADS $dst dw > /tmp/bismark/active/netperf-out
"$BROOT"/usr/bin/bismark-netperf $BR_DW_DURATION $NTHREADS $dst $info dw > /tmp/bismark/active/netperf-out
cat /tmp/bismark/active/netperf-out | "$BROOT"/usr/bin/bismark-mstats BITRATE NETPERF_${NTHREADS} $dst $src $dir | grep -v nan >> $XML_FILE
cat /tmp/bismark/active/iface-out | "$BROOT"/usr/bin/bismark-mstats AGGL3BITRATE IFACE $dst $src $dir | grep -v nan >> $XML_FILE
rm /tmp/bismark/active/netperf-out
Expand All @@ -175,7 +175,7 @@ if [ ! -e /tmp/bismark/var/mlock ]; then
sleep $wait
dir="up"
( sleep 3 ; "$BROOT"/usr/bin/bismark-ping $dst | "$BROOT"/usr/bin/bismark-mstats ULRTTUP PING $src $dst $dir >> $XML_FILE ) &
"$BROOT"/usr/bin/bismark-netperf $BR_UP_DURATION $NTHREADS $dst up > /tmp/bismark/active/netperf-out
"$BROOT"/usr/bin/bismark-netperf $BR_UP_DURATION $NTHREADS $dst $info up > /tmp/bismark/active/netperf-out
cat /tmp/bismark/active/netperf-out | "$BROOT"/usr/bin/bismark-mstats BITRATE NETPERF_${NTHREADS} $src $dst $dir | grep -v nan >> $XML_FILE
cat /tmp/bismark/active/iface-out | "$BROOT"/usr/bin/bismark-mstats AGGL3BITRATE IFACE $dst $src $dir | grep -v nan >> $XML_FILE
rm /tmp/bismark/active/netperf-out
Expand Down Expand Up @@ -209,7 +209,7 @@ if [ ! -e /tmp/bismark/var/mlock ]; then
if get_target Bismark SP $ZONE 150 ; then
if [ $wait -lt $MAX_MEASURE_WAIT ]; then
sleep $wait
"$BROOT"/usr/bin/bismark-sp $dst >> $XML_FILE
"$BROOT"/usr/bin/bismark-sp $dst $info >> $XML_FILE
fi
fi
fi
Expand Down
7 changes: 4 additions & 3 deletions device/OpenWrt_common/scripts/bismark-netperf
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
. "$BROOT"/etc/bismark/bismark-active.conf

# Help screen
[ $4 ] || { echo "usage: $(basename $0) <duration> <nthreads> <dst_ip> <up|dw>" ; exit ; }
[ $5 ] || { echo "usage: $(basename $0) <duration> <nthreads> <dst_ip> <dst_post> <up|dw>" ; exit ; }

# Settings
DATA_DIR=/tmp/bismark/active
cmd=/usr/bin/netperf
out="$DATA_DIR/netperf-tmp-out"
err="$DATA_DIR/netperf-err"
ifaceout="$DATA_DIR/iface-out"
port=$NETPERF_PORT
#port=$NETPERF_PORT
dataport=$NETPERF_DATAPORT

# Auxiliary functions
Expand Down Expand Up @@ -54,7 +54,8 @@ parse() {
T=$1
N=$2
host=$3
dir=$4
port=$4
dir=$5
keys=" -l$T -P0 -fk"
case $dir in
dw)
Expand Down
5 changes: 3 additions & 2 deletions device/OpenWrt_common/scripts/bismark-sp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
. /usr/lib/bismark/functions.inc.sh

# Help screen
[ $1 ] || { echo "usage: $(basename $0) <dst_ip>" ; exit ; }
[ $2 ] || { echo "usage: $(basename $0) <dst_ip> <dst_port>" ; exit ; }

# Get measure info
get_ip
dst=$1
port=$2
tstamp=$(date +%s)

/usr/bin/prober | awk '
/usr/bin/prober -s $dst -p $port | awk '
BEGIN{ RS="[\r\n]" }
/^Upstream:/{ print "\t<measurement param=CAPACITY tool=SP srcip='$src' dstip='$dst' timestamp='$tstamp' avg=" $2 " std=0 min=" $2 " max=" $2 " med=" $2 " iqr=0 direction=\"up\" />" }
/^Downstream:/{ print "\t<measurement param=CAPACITY tool=SP srcip='$dst' dstip='$src' timestamp='$tstamp' avg=" $2 " std=0 min=" $2 " max=" $2 " med=" $2 " iqr=0 direction=\"dw\" />" }
Expand Down

0 comments on commit 9dfcdaf

Please sign in to comment.