summaryrefslogtreecommitdiff
path: root/netperf-defs/netperf-client-napi.sh
blob: 65b45d847511805bea181e882948b8e889490048 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

set -x

cat /tmp/lava_multi_node_network_cache.txt

local_ip=$(ifconfig|grep "inet addr"|grep -v "127.0.0.1"|cut -d: -f2|cut -d' ' -f1)

for line in `lava-group | awk '{print $1}'` ; do
	echo $line
	# get the ipv4 for this device
	STR=`lava-network query $line ipv4`
	echo "STR: "$STR
	# strip off the prefix for ipv4
	DUT=`echo $STR | sed -e 's/.*addr://'`
	echo "DUT: "$DUT
	if [ "${local_ip}" != "${DUT}" ]; then
		remote_ip=${DUT}
		echo ${remote_ip}
		break
	fi
done

if [ -z ${remote_ip} ]
then
	echo "Missing remote ip!"
	exit 1
fi

cd netperf/build/bin
which python
pwd
ls -l ../../../
for m in 64 128 256 512 1024 2048 4096 8192 16384; do ./netperf -H ${remote_ip} -l 20 -c -C -- -m $m -D; done | ../../../netperf-defs/netperf2LAVA.py
for m in 64 128 256 512 1024 2048 4096 8192 16384; do ./netperf -H ${remote_ip} -l 20 -t UDP_STREAM -c -C -- -m $m -D; done | ../../../netperf-defs/netperf2LAVA.py
for m in 1 32 64 128 512 1024 4096 8192 16384; do ./netperf -t TCP_RR -H ${remote_ip} -l 20 -c -C -- -r $m,$m -D; done | ../../../netperf-defs/netperf2LAVA.py
for m in 1 32 64 128 512 1024 4096 8192 16384; do ./netperf -t UDP_RR -H ${remote_ip} -l 20 -c -C -- -r $m,$m -D; done | ../../../netperf-defs/netperf2LAVA.py