summaryrefslogtreecommitdiff
path: root/ubuntu
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2013-09-14 08:32:18 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2013-09-14 08:32:18 +0300
commit8aba80974651e1d9f1c42f52a0ff28da21d9dc0a (patch)
tree15ed496c25d21efae38462a983b32376113f1001 /ubuntu
parentdf9b05d5334f112f09ead8072d80a0a31e129920 (diff)
common/netperf: move netperf scripts under common directory
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Diffstat (limited to 'ubuntu')
-rw-r--r--ubuntu/netperf-client-multinode.yaml2
-rw-r--r--ubuntu/netperf-server-multinode.yaml2
-rwxr-xr-xubuntu/scripts/netperf-client.sh34
-rwxr-xr-xubuntu/scripts/netperf-server.sh5
-rwxr-xr-xubuntu/scripts/netperf2LAVA.py63
5 files changed, 2 insertions, 104 deletions
diff --git a/ubuntu/netperf-client-multinode.yaml b/ubuntu/netperf-client-multinode.yaml
index 883e995..49e2175 100644
--- a/ubuntu/netperf-client-multinode.yaml
+++ b/ubuntu/netperf-client-multinode.yaml
@@ -31,7 +31,7 @@ run:
- lava-network broadcast eth0
- lava-network collect eth0
- lava-sync ready
- - lava-test-case multinode-lava-network --shell ./ubuntu/scripts/netperf-client.sh
+ - lava-test-case multinode-lava-network --shell ./common/scripts/netperf-client.sh
- lava-sync done
parse:
diff --git a/ubuntu/netperf-server-multinode.yaml b/ubuntu/netperf-server-multinode.yaml
index 93902be..7e6f537 100644
--- a/ubuntu/netperf-server-multinode.yaml
+++ b/ubuntu/netperf-server-multinode.yaml
@@ -31,7 +31,7 @@ run:
- lava-network broadcast eth0
- lava-network collect eth0
- lava-sync ready
- - lava-test-case multinode-lava-network --shell ./ubuntu/scripts/netperf-server.sh
+ - lava-test-case multinode-lava-network --shell ./common/scripts/netperf-server.sh
- lava-sync done
parse:
diff --git a/ubuntu/scripts/netperf-client.sh b/ubuntu/scripts/netperf-client.sh
deleted file mode 100755
index aadfc94..0000000
--- a/ubuntu/scripts/netperf-client.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-set -x
-
-local_ip=$(ifconfig|grep "inet addr"|grep -v "127.0.0.1"|cut -d: -f2|cut -d' ' -f1)
-
-for line in `lava-group | grep server | 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
-
-ifconfig -a
-ping -c 1 ${remote_ip} || exit 1
-ping -c 30 ${remote_ip} | ./ubuntu/scripts/netperf2LAVA.py
-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 | ./ubuntu/scripts/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 | ./ubuntu/scripts/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 | ./ubuntu/scripts/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 | ./ubuntu/scripts/netperf2LAVA.py
diff --git a/ubuntu/scripts/netperf-server.sh b/ubuntu/scripts/netperf-server.sh
deleted file mode 100755
index 7e2fc3c..0000000
--- a/ubuntu/scripts/netperf-server.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-set -x
-
-netserver && echo 'test_case_id:netserver units:none measurement:0 result:pass' || echo 'test_case_id:netserver units:none measurement:0 result:fail'
diff --git a/ubuntu/scripts/netperf2LAVA.py b/ubuntu/scripts/netperf2LAVA.py
deleted file mode 100755
index ee1199d..0000000
--- a/ubuntu/scripts/netperf2LAVA.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/python
-import re
-import sys
-
-#Parse netperf results looking for the data in the form of
-#line = "87380 16384 2048 10.00 4289.48 51.12 51.12 3.905 3.905" ./netperf -l 10 -c -C -- -m 2048 -D
-#line = "180224 8192 10.00 1654855 0 10845.1 52.60 1.589" ./netperf -t UDP_STREAM -l 10 -c -C -- -m 8192 -D
-#line = "180224 10.00 1649348 10809.0 52.60 1.589" rcv side of UDP_STREAM
-#line = "16384 87380 1 1 10.00 47469.68 29.84 29.84 25.146 25.146" ./netperf -t TCP_RR -l 10 -c -C -- -r 1,1
-
-found_result = "false"
-parser_rtt = re.compile("^rtt\s+\S+\s+\=\s+(?P<min>\d+\.\d+)\/(?P<avg>\d+\.\d+)\/(?P<max>\d+\.\d+)\/(?P<mdev>\d+\.\d+)")
-parser_tcp = re.compile("^\s*(?P<Recv>\d+)\s+(?P<Send>\d+)\s+(?P<Msg>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<throughput>\d+\.\d+)\s+(?P<cpu_s>\d+\.\d+)\s+(?P<cpu_r>\d+\.\d+)\s+(?P<srv_s>\d+\.\d+)\s+(?P<dem_r>\d+\.\d+)\s*$")
-parser_udp_l = re.compile("^\s*(?P<Sock>\d+)\s+(?P<Msg>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<Okey>\d+)\s+(?P<Errs>\d+)\s+(?P<throughput>\d+\.\d+)\s+(?P<cpu_s>\d+\.\d+)\s+(?P<srv_s>\d+\.\d+)\s*$")
-parser_udp_r = re.compile("^\s*(?P<Sock>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<Okey>\d+)\s+(?P<throughput>\d+\.\d+)\s+(?P<cpu_r>\d+\.\d+)\s+(?P<srv_r>\d+\.\d+)\s*$")
-parser_rr = re.compile("^\s*(?P<Send>\d+)\s+(?P<Recv>\d+)\s+(?P<Req>\d+)\s+(?P<Res>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<trans>\d+\.\d+)\s+(?P<cpu_s>\d+\.\d+)\s+(?P<cpu_r>\d+\.\d+)\s+(?P<srv_s>\d+\.\d+)\s+(?P<dem_r>\d+\.\d+)\s*$")
-parser_rr_tcp = re.compile("TCP REQUEST/RESPONSE")
-parser_rr_udp = re.compile("UDP REQUEST/RESPONSE")
-
-for line in sys.stdin:
- for parser in [parser_rtt, parser_tcp, parser_udp_l, parser_udp_r, parser_rr, parser_rr_tcp, parser_rr_udp]:
- result = parser.search(line)
- if result is not None:
- if parser is parser_rr_tcp:
- rr_type = "TCP_RR"
- break
- if parser is parser_rr_udp:
- rr_type = "UDP_RR"
- break
- if parser is parser_rtt:
- print "test_case_id:PING_RTT min" + " units:ms " + "measurement:" + result.group('min') + " result:pass"
- print "test_case_id:PING_RTT avg" + " units:ms " + "measurement:" + result.group('avg') + " result:pass"
- print "test_case_id:PING_RTT max" + " units:ms " + "measurement:" + result.group('max') + " result:pass"
- print "test_case_id:PING_RTT mdev" + " units:ms " + "measurement:" + result.group('mdev') + " result:pass"
- found_result = "true"
- break
- if parser is parser_tcp:
- print "test_case_id:TCP_STREAM throughput" + "(Msg Sz: " + result.group('Msg') + ")" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:pass"
- print "test_case_id:TCP_STREAM snd cpu utilization" + "(Msg Sz: " + result.group('Msg') + ")" + " units:% " + "measurement:" + result.group('cpu_s') + " result:pass"
- print "test_case_id:TCP_STREAM rcv cpu utilization" + "(Msg Sz: " + result.group('Msg') + ")" + " units:% " + "measurement:" + result.group('cpu_r') + " result:pass"
- found_result = "true"
- break
- if parser is parser_udp_l:
- print "test_case_id:UDP_STREAM snd throughput" + "(Msg Sz: " + result.group('Msg') + ")" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:pass"
- print "test_case_id:UDP_STREAM snd cpu utilization" + "(Msg Sz: " + result.group('Msg') + ")" + " units:% " + "measurement:" + result.group('cpu_s') + " result:pass"
- found_result = "true"
- break
- if parser is parser_udp_r:
- print "test_case_id:UDP_STREAM rcv throughput" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:pass"
- print "test_case_id:UDP_STREAM rcv cpu utilization" + " units:% " + "measurement:" + result.group('cpu_r') + " result:pass"
- found_result = "true"
- break
- if parser is parser_rr:
- print "test_case_id:" + rr_type + " transaction rate" + "(Req Sz: " + result.group('Req') + " Res Sz: " + result.group('Res') + ")" + " units:trans/sec " + "measurement:" + result.group('trans') + " result:pass"
- print "test_case_id:" + rr_type + " snd cpu utilization" + "(Req Sz: " + result.group('Req') + " Res Sz: " + result.group('Res') + ")" + " units:% " + "measurement:" + result.group('cpu_s') + " result:pass"
- print "test_case_id:" + rr_type + " rcv cpu utilization" + "(Req Sz: " + result.group('Req') + " Res Sz: " + result.group('Res') + ")" + " units:% " + "measurement:" + result.group('cpu_r') + " result:pass"
- found_result = "true"
- break
- else:
- continue
-
-if found_result == "false":
- print "units:none " + "measurement:" + "0" + " result:fail"