diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index f2289460764690d9e046d028228aa3a6234ab947..e4195edde06a878c5e8e6f12bf596ad2e65e9d98 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -80,6 +80,121 @@ function report_test_usage { echo "" } +function analyzePingFiles { + for PING_CASE in $PING_LOGS + do + echo " <tr>" >> ./test_simulator_results.html + NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " <td>$NAME</td>" >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` + echo " <td>$CMD</td>" >> ./test_simulator_results.html + FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then + echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html + echo " <td>N/A</td>" >> ./test_simulator_results.html + else + NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` + NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` + if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] + then + echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html + else + echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html + fi + echo " <td>" >> ./test_simulator_results.html + echo " <pre>" >> ./test_simulator_results.html + STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"` + echo "Packet Loss : $STATS" >> ./test_simulator_results.html + RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'` + echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html + RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'` + echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html + RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'` + echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html + echo " </pre>" >> ./test_simulator_results.html + echo " </td>" >> ./test_simulator_results.html + fi + echo " </tr>" >> ./test_simulator_results.html + done +} + +function analyzeIperfFiles { + for IPERF_CASE in $IPERF_TESTS + do + echo " <tr>" >> ./test_simulator_results.html + NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " <td>$NAME</td>" >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` + echo " <td>$CMD</td>" >> ./test_simulator_results.html + REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` + if [[ $REQ_BITRATE =~ .*K.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*M.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*G.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` + fi + FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then + echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html + SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` + FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'` + EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` + PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` + PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"` + else + EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l` + fi + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` + if [[ $PERF_INT -lt 70 ]] + then + echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html + else + echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html + fi + EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"` + PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"` + fi + echo " <td>" >> ./test_simulator_results.html + echo " <pre>" >> ./test_simulator_results.html + echo "Bitrate : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html + echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html + echo "Jitter : $JITTER" >> ./test_simulator_results.html + echo "Packet Loss : $PACKETLOSS" >> ./test_simulator_results.html + echo " </pre>" >> ./test_simulator_results.html + echo " </td>" >> ./test_simulator_results.html + echo " </tr>" >> ./test_simulator_results.html + done +} + function report_test { echo "############################################################" echo "OAI CI VM script" @@ -287,124 +402,11 @@ function report_test { echo " </pre></td>" >> ./test_simulator_results.html echo " </tr>" >> ./test_simulator_results.html fi - PING_CASE=$ARCHIVES_LOC/${TMODE}_${BW}MHz_ping_ue.txt - if [ -f $PING_CASE ] - then - echo " <tr>" >> ./test_simulator_results.html - NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` - echo " <td>$NAME</td>" >> ./test_simulator_results.html - CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` - echo " <td>$CMD</td>" >> ./test_simulator_results.html - FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` - if [ $FILE_COMPLETE -eq 0 ] - then - echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html - echo " <td>N/A</td>" >> ./test_simulator_results.html - else - NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` - NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` - if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] - then - echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html - else - echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html - fi - echo " <td>" >> ./test_simulator_results.html - echo " <pre>" >> ./test_simulator_results.html - STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"` - echo "Packet Loss : $STATS" >> ./test_simulator_results.html - RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'` - echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html - RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'` - echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html - RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'` - echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html - echo " </pre>" >> ./test_simulator_results.html - echo " </td>" >> ./test_simulator_results.html - fi - echo " </tr>" >> ./test_simulator_results.html - fi + PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_ping_ue.txt 2> /dev/null` + analyzePingFiles - if [ -f $ARCHIVES_LOC/${TMODE}_${BW}*iperf*dl*client*txt ] - then - IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}*iperf*client*txt` - else - echo "There are no iperf files" - IPERF_TESTS="" - fi - for IPERF_CASE in $IPERF_TESTS - do - echo " <tr>" >> ./test_simulator_results.html - NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"` - echo " <td>$NAME</td>" >> ./test_simulator_results.html - CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` - echo " <td>$CMD</td>" >> ./test_simulator_results.html - REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` - if [[ $REQ_BITRATE =~ .*K.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*M.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*G.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` - fi - FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` - if [ $FILE_COMPLETE -eq 0 ] - then - echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html - SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` - FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'` - EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` - PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` - JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` - PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` - PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"` - else - EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l` - fi - if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l` - fi - if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l` - fi - PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` - PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` - if [[ $PERF_INT -lt 70 ]] - then - echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html - else - echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html - fi - EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"` - PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"` - fi - echo " <td>" >> ./test_simulator_results.html - echo " <pre>" >> ./test_simulator_results.html - echo "Bitrate : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html - echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html - echo "Jitter : $JITTER" >> ./test_simulator_results.html - echo "Packet Loss : $PACKETLOSS" >> ./test_simulator_results.html - echo " </pre>" >> ./test_simulator_results.html - echo " </td>" >> ./test_simulator_results.html - echo " </tr>" >> ./test_simulator_results.html - done + IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}*iperf*client*txt 2> /dev/null` + analyzeIperfFiles done done @@ -480,20 +482,20 @@ function report_test { NB_USERS=(01 04) for CN_CONFIG in ${EPC_CONFIGS[@]} do - echo " <tr bgcolor = \"#8FBC8F\" >" >> ./test_simulator_results.html - if [[ $CN_CONFIG =~ .*wS1.* ]] - then - echo " <td align = \"center\" colspan = 4 >Test with EPC (aka withS1)</td>" >> ./test_simulator_results.html - else - echo " <td align = \"center\" colspan = 4 >Test without EPC (aka noS1)</td>" >> ./test_simulator_results.html - fi - echo " </tr>" >> ./test_simulator_results.html for TMODE in ${TRANS_MODES[@]} do for BW in ${BW_CASES[@]} do for UES in ${NB_USERS[@]} do + echo " <tr bgcolor = \"#8FBC8F\" >" >> ./test_simulator_results.html + if [[ $CN_CONFIG =~ .*wS1.* ]] + then + echo " <td align = \"center\" colspan = 4 >Test with EPC (aka withS1): ${TMODE} -- ${BW}MHz -- ${UES} user(s)</td>" >> ./test_simulator_results.html + else + echo " <td align = \"center\" colspan = 4 >Test without EPC (aka noS1): ${TMODE} -- ${BW}MHz -- ${UES} user(s)</td>" >> ./test_simulator_results.html + fi + echo " </tr>" >> ./test_simulator_results.html ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}MHz_${UES}users_${CN_CONFIG}_enb.log UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"` if [ -f $ENB_LOG ] && [ -f $UE_LOG ] @@ -534,44 +536,14 @@ function report_test { echo " </pre></td>" >> ./test_simulator_results.html echo " </tr>" >> ./test_simulator_results.html fi - PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${UES}users_${CN_CONFIG}_ping*.log` - for PING_CASE in $PING_LOGS - do - echo " <tr>" >> ./test_simulator_results.html - NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` - echo " <td>$NAME</td>" >> ./test_simulator_results.html - CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` - echo " <td>$CMD</td>" >> ./test_simulator_results.html - FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` - if [ $FILE_COMPLETE -eq 0 ] - then - echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html - echo " <td>N/A</td>" >> ./test_simulator_results.html - else - NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` - NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` - if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] - then - echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html - else - echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html - fi - echo " <td>" >> ./test_simulator_results.html - echo " <pre>" >> ./test_simulator_results.html - STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"` - echo "Packet Loss : $STATS" >> ./test_simulator_results.html - RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'` - echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html - RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'` - echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html - RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'` - echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html - echo " </pre>" >> ./test_simulator_results.html - echo " </td>" >> ./test_simulator_results.html - fi - echo " </tr>" >> ./test_simulator_results.html - done + PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${UES}users_${CN_CONFIG}_ping*.log 2> /dev/null` + analyzePingFiles + + IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${UES}users_${CN_CONFIG}_iperf_dl*client*txt 2> /dev/null` + analyzeIperfFiles + IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${UES}users_${CN_CONFIG}_iperf_ul*client*txt 2> /dev/null` + analyzeIperfFiles done done done diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 2d51c9a83e67a56116021a86be51640d809f9a77..01d20475b4c87cd3fb23f26485f7ed0b1014adae 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -91,8 +91,32 @@ function start_basic_sim_enb { echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ./my-lte-softmodem-run.sh" >> $1 ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1 - sleep 10 rm $1 + sleep 5 + + local i="0" + echo "egrep -c \"got sync\" /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE" > $1 + while [ $i -lt 10 ] + do + CONNECTED=`ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1` + if [ $CONNECTED -ne 0 ] + then + i="100" + else + sleep 5 + i=$[$i+1] + fi + done + ENB_SYNC=0 + rm $1 + if [ $i -lt 50 ] + then + ENB_SYNC=0 + echo "Basic-Sim eNB: eNB did NOT got sync" + else + echo "Basic-Sim eNB: eNB GOT SYNC --> waiting for UE to connect" + fi + sleep 5 } function start_basic_sim_ue { @@ -124,12 +148,35 @@ function start_basic_sim_ue { i=$[$i+1] fi done + UE_SYNC=1 + rm $1 + if [ $i -lt 50 ] + then + UE_SYNC=0 + echo "Basic-Sim UE: oaitun_ue1 is DOWN and/or NOT CONFIGURED" + else + echo "Basic-Sim UE: oaitun_ue1 is UP and CONFIGURED" + fi + i="0" + echo "egrep -c \"Generating RRCConnectionReconfigurationComplete\" /home/ubuntu/tmp/cmake_targets/log/$LOC_UE_LOG_FILE" > $1 + while [ $i -lt 10 ] + do + CONNECTED=`ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1` + if [ $CONNECTED -ne 0 ] + then + i="100" + else + sleep 5 + i=$[$i+1] + fi + done rm $1 if [ $i -lt 50 ] then UE_SYNC=0 + echo "Basic-Sim UE: UE did NOT complete RRC Connection" else - UE_SYNC=1 + echo "Basic-Sim UE: UE did COMPLETE RRC Connection" fi } @@ -227,48 +274,6 @@ function check_ping_result { fi } -function iperf_dl { - local REQ_BANDWIDTH=$5 - local BASE_LOG_FILE=$6 - echo "echo \"iperf -u -s -i 1\"" > $1 - echo "echo \"COMMAND IS: iperf -u -s -i 1\" > tmp/cmake_targets/log/${BASE_LOG_FILE}_server.txt" > $1 - echo "nohup iperf -u -s -i 1 >> tmp/cmake_targets/log/${BASE_LOG_FILE}_server.txt &" >> $1 - ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1 - rm $1 - - echo "echo \"iperf -c $UE_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\"" > $3 - echo "echo \"COMMAND IS: iperf -c $UE_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\" > ${BASE_LOG_FILE}_client.txt" > $3 - echo "iperf -c $UE_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1 >> ${BASE_LOG_FILE}_client.txt" >> $3 - echo "tail -3 ${BASE_LOG_FILE}_client.txt | grep -v grams" >> $3 - ssh -T -o StrictHostKeyChecking=no ubuntu@$4 < $3 - rm -f $3 - - echo "killall --signal SIGKILL iperf" >> $1 - ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1 - rm $1 -} - -function iperf_ul { - local REQ_BANDWIDTH=$5 - local BASE_LOG_FILE=$6 - echo "echo \"iperf -u -s -i 1\"" > $3 - echo "echo \"COMMAND IS: iperf -u -s -i 1\" > ${BASE_LOG_FILE}_server.txt" > $3 - echo "nohup iperf -u -s -i 1 >> ${BASE_LOG_FILE}_server.txt &" >> $3 - ssh -T -o StrictHostKeyChecking=no ubuntu@$4 < $3 - rm $3 - - echo "echo \"iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\"" > $1 - echo "echo \"COMMAND IS: iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\" > /home/ubuntu/tmp/cmake_targets/log/${BASE_LOG_FILE}_client.txt" > $1 - echo "iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1 >> /home/ubuntu/tmp/cmake_targets/log/${BASE_LOG_FILE}_client.txt" >> $1 - echo "tail -3 /home/ubuntu/tmp/cmake_targets/log/${BASE_LOG_FILE}_client.txt | grep -v grams" >> $1 - ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1 - rm -f $1 - - echo "killall --signal SIGKILL iperf" >> $3 - ssh -T -o StrictHostKeyChecking=no ubuntu@$4 < $3 - rm $3 -} - # In DL: iperf server should be on UE side # -B oaitun_ue{j}-IP-Addr # iperf client should be on EPC (S1) or eNB (noS1) side @@ -587,6 +592,8 @@ function start_epc { echo "cd /opt/ltebox/tools/" >> $LOC_EPC_VM_CMDS echo "echo \"sudo ./start_ltebox\"" >> $LOC_EPC_VM_CMDS echo "nohup sudo ./start_ltebox > /home/ubuntu/ltebox.txt" >> $LOC_EPC_VM_CMDS + echo "touch /home/ubuntu/try.txt" >> $LOC_EPC_VM_CMDS + echo "sudo rm -f /home/ubuntu/*.txt" >> $LOC_EPC_VM_CMDS ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_EPC_VM_IP_ADDR < $LOC_EPC_VM_CMDS rm -f $LOC_EPC_VM_CMDS @@ -775,7 +782,7 @@ function start_l2_sim_enb { rm $1 if [ $i -lt 50 ] then - UE_SYNC=0 + ENB_SYNC=0 echo "L2-SIM eNB oaitun_enb1 is DOWN or NOT CONFIGURED" else echo "L2-SIM eNB oaitun_enb1 is UP and CONFIGURED" @@ -830,9 +837,9 @@ function start_l2_sim_ue { echo "cd /home/ubuntu/tmp/cmake_targets/lte_build_oai/build/" >> $1 if [ $LOC_S1_CONFIGURATION -eq 0 ] then - echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --L2-emul 3 --num-ues $LOC_NB_UES --noS1\" > ./my-lte-softmodem-run.sh " >> $1 + echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --L2-emul 3 --num-ues $LOC_NB_UES --nokrnmod 1 --noS1\" > ./my-lte-softmodem-run.sh " >> $1 else - echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --L2-emul 3 --num-ues $LOC_NB_UES\" > ./my-lte-softmodem-run.sh " >> $1 + echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --L2-emul 3 --num-ues $LOC_NB_UES --nokrnmod 1\" > ./my-lte-softmodem-run.sh " >> $1 fi echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1 echo "cat ./my-lte-softmodem-run.sh" >> $1 @@ -976,10 +983,34 @@ function start_rf_sim_enb { ENB_SYNC=1 echo "RF-SIM eNB is sync'ed: waiting for UE(s) to connect" fi + if [ $LOC_S1_CONFIGURATION -eq 0 ] + then + echo "ifconfig oaitun_enb1 | egrep -c \"inet addr\"" > $1 + # Checking oaitun_enb1 interface has now an IP address + i="0" + while [ $i -lt 10 ] + do + CONNECTED=`ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_ENB_VM_IP_ADDR < $1` + if [ $CONNECTED -eq 1 ] + then + i="100" + else + i=$[$i+1] + sleep 5 + fi + done + rm $1 + if [ $i -lt 50 ] + then + ENB_SYNC=0 + echo "RF-SIM eNB oaitun_enb1 is DOWN or NOT CONFIGURED" + else + echo "RF-SIM eNB oaitun_enb1 is UP and CONFIGURED" + fi + fi sleep 10 } -#start_rf_sim_ue $UE_VM_CMDS $UE_VM_IP_ADDR $ENB_VM_IP_ADDR $CURRENT_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG function start_rf_sim_ue { local LOC_UE_VM_IP_ADDR=$2 local LOC_ENB_VM_IP_ADDR=$3 @@ -997,9 +1028,9 @@ function start_rf_sim_ue { echo "cd /home/ubuntu/tmp/cmake_targets/lte_build_oai/build/" >> $1 if [ $LOC_S1_CONFIGURATION -eq 0 ] then - echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -C ${LOC_FREQUENCY}000000 -r $LOC_PRB --rfsim --noS1\" > ./my-lte-softmodem-run.sh " >> $1 + echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -C ${LOC_FREQUENCY}000000 -r $LOC_PRB --nokrnmod 1 --rfsim --noS1\" > ./my-lte-softmodem-run.sh " >> $1 else - echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -C ${LOC_FREQUENCY}000000 -r $LOC_PRB --rfsim\" > ./my-lte-softmodem-run.sh " >> $1 + echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem -C ${LOC_FREQUENCY}000000 -r $LOC_PRB --nokrnmod 1 --rfsim\" > ./my-lte-softmodem-run.sh " >> $1 fi echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1 echo "cat ./my-lte-softmodem-run.sh" >> $1 @@ -1015,13 +1046,14 @@ function start_rf_sim_ue { do sleep 5 CONNECTED=`ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1` - if [ $CONNECTED -eq 1 ] + if [ $CONNECTED -ne 0 ] then i="100" else i=$[$i+1] fi done + UE_SYNC=1 rm $1 if [ $i -lt 50 ] then @@ -1029,10 +1061,8 @@ function start_rf_sim_ue { echo "RF-SIM UE is NOT sync'ed w/ eNB" return else - UE_SYNC=1 echo "RF-SIM UE is sync'ed w/ eNB" fi - return # Checking oaitun_ue1 interface has now an IP address i="0" echo "ifconfig oaitun_ue1 | egrep -c \"inet addr\"" > $1 @@ -1051,10 +1081,9 @@ function start_rf_sim_ue { if [ $i -lt 50 ] then UE_SYNC=0 - echo "RF-SIM UE oaitun_ue1 is NOT sync'ed w/ EPC" + echo "RF-SIM UE oaitun_ue1 is DOWN or NOT CONFIGURED" else - UE_SYNC=1 - echo "RF-SIM UE oaitun_ue1 is sync'ed w/ EPC" + echo "RF-SIM UE oaitun_ue1 is UP and CONFIGURED" fi sleep 10 } @@ -1249,8 +1278,8 @@ function run_test_on_vm { for BW in ${BW_CASES[@]} do # Not Running in TDD-10MHz and TDD-20MHz : too unstable - if [[ $TMODE =~ .*tdd.* ]] && [[ $BW =~ .*10.* ]]; then continue; fi - if [[ $TMODE =~ .*tdd.* ]] && [[ $BW =~ .*20.* ]]; then continue; fi + #if [[ $TMODE =~ .*tdd.* ]] && [[ $BW =~ .*10.* ]]; then continue; fi + #if [[ $TMODE =~ .*tdd.* ]] && [[ $BW =~ .*20.* ]]; then continue; fi if [[ $BW =~ .*05.* ]]; then PRB=25; fi if [[ $BW =~ .*10.* ]]; then PRB=50; fi @@ -1291,8 +1320,10 @@ function run_test_on_vm { scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 - # Not more testing in TDD-5MHz : too unstable + # Not more testing in any TDD : too unstable if [[ $TMODE =~ .*tdd.* ]] && [[ $BW =~ .*05.* ]]; then full_terminate; continue; fi + if [[ $TMODE =~ .*tdd.* ]] && [[ $BW =~ .*10.* ]]; then full_terminate; continue; fi + if [[ $TMODE =~ .*tdd.* ]] && [[ $BW =~ .*20.* ]]; then full_terminate; continue; fi echo "############################################################" echo "Iperf DL" echo "############################################################" @@ -1303,9 +1334,9 @@ function run_test_on_vm { THROUGHPUT=6 fi CURR_IPERF_LOG_BASE=${TMODE}_${BW}MHz_iperf_dl - iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE + generic_iperf $VM_CMDS $VM_IP_ADDR $UE_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR $REAL_EPC_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE 0 0 scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE $THROUGHPUT # Not more testing in FDD-20MHz : too unstable @@ -1315,9 +1346,9 @@ function run_test_on_vm { echo "############################################################" THROUGHPUT=2 CURR_IPERF_LOG_BASE=${TMODE}_${BW}MHz_iperf_ul - iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE + generic_iperf $EPC_VM_CMDS $EPC_VM_IP_ADDR $REAL_EPC_IP_ADDR $VM_CMDS $VM_IP_ADDR $UE_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE 0 0 scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE $THROUGHPUT full_terminate @@ -1456,6 +1487,7 @@ function run_test_on_vm { install_epc_on_vm $EPC_VM_NAME $EPC_VM_CMDS EPC_VM_IP_ADDR=`uvt-kvm ip $EPC_VM_NAME` + # withS1 configuration is not working #EPC_CONFIGS=("wS1" "noS1") #TRANS_MODES=("fdd" "tdd") #BW_CASES=(05 10 20) @@ -1474,12 +1506,11 @@ function run_test_on_vm { # Retrieve EPC real IP address retrieve_real_epc_ip_addr $EPC_VM_NAME $EPC_VM_CMDS $EPC_VM_IP_ADDR S1_NOS1_CFG=1 - continue else - #echo "############################################################" - #echo "Terminate EPC" - #echo "############################################################" - #terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + echo "############################################################" + echo "Terminate EPC" + echo "############################################################" + terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR echo "############################################################" echo "Running now in a no-S1 configuration" @@ -1529,7 +1560,74 @@ function run_test_on_vm { return fi - sleep 30 + if [ $S1_NOS1_CFG -eq 1 ] + then + get_ue_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR 1 + + echo "############################################################" + echo "${CN_CONFIG} : Pinging the EPC from UE" + echo "############################################################" + PING_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_ping_epc.log + ping_epc_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR $REAL_EPC_IP_ADDR $PING_LOG_FILE 1 0 + scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + else + get_enb_noS1_ip_addr $ENB_VM_CMDS $ENB_VM_IP_ADDR + + echo "############################################################" + echo "${CN_CONFIG} : Pinging the eNB from UE" + echo "############################################################" + PING_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_ping_enb_from_ue.log + ping_epc_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR $ENB_IP_ADDR $PING_LOG_FILE 1 0 + scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + fi + + if [ $S1_NOS1_CFG -eq 1 ] + then + echo "############################################################" + echo "${CN_CONFIG} : Pinging the UE from EPC" + echo "############################################################" + PING_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_ping_ue.log + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE 0 + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + else + echo "############################################################" + echo "${CN_CONFIG} : Pinging the UE from eNB" + echo "############################################################" + get_ue_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR 1 + PING_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_ping_from_enb_ue.log + ping_enb_ip_addr $ENB_VM_CMDS $ENB_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE 0 + scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + fi + + if [ $S1_NOS1_CFG -eq 0 ] + then + get_enb_noS1_ip_addr $ENB_VM_CMDS $ENB_VM_IP_ADDR + echo "############################################################" + echo "${CN_CONFIG} : iperf DL -- UE is server and eNB is client" + echo "############################################################" + IPERF_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_iperf_dl + get_ue_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR 1 + THROUGHPUT=4 + generic_iperf $UE_VM_CMDS $UE_VM_IP_ADDR $UE_IP_ADDR $ENB_VM_CMDS $ENB_VM_IP_ADDR $ENB_IP_ADDR $THROUGHPUT $IPERF_LOG_FILE 1 0 + scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_client.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$IPERF_LOG_FILE $THROUGHPUT + + echo "############################################################" + echo "${CN_CONFIG} : iperf UL -- eNB is server and UE is client" + echo "############################################################" + IPERF_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_iperf_ul + THROUGHPUT=2 + get_ue_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR 1 + generic_iperf $ENB_VM_CMDS $ENB_VM_IP_ADDR $ENB_IP_ADDR $UE_VM_CMDS $UE_VM_IP_ADDR $UE_IP_ADDR $THROUGHPUT $IPERF_LOG_FILE 1 0 + scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_client.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$IPERF_LOG_FILE $THROUGHPUT + fi echo "############################################################" echo "${CN_CONFIG} : Terminate enb/ue simulators" @@ -1542,6 +1640,21 @@ function run_test_on_vm { done done done + + full_l2_sim_destroy + + echo "############################################################" + echo "Checking run status" + echo "############################################################" + + if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi + if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi + if [ $STATUS -eq 0 ] + then + echo "TEST_OK" > $ARCHIVES_LOC/test_final_status.log + else + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log + fi fi if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-l2-sim.* ]] @@ -1775,7 +1888,7 @@ function run_test_on_vm { scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_server.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_client.txt $ARCHIVES_LOC tail -3 $ARCHIVES_LOC/${IPERF_LOG_FILE}_client.txt | grep -v datagram - check_iperf $ARCHIVES_LOC/$IPERF_LOG_FILE $THROUGHPUT + #check_iperf $ARCHIVES_LOC/$IPERF_LOG_FILE $THROUGHPUT j=$[$j+1] done fi @@ -1820,7 +1933,7 @@ function run_test_on_vm { scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_server.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_client.txt $ARCHIVES_LOC tail -3 $ARCHIVES_LOC/${IPERF_LOG_FILE}_client.txt | grep -v datagram - check_iperf $ARCHIVES_LOC/$IPERF_LOG_FILE $THROUGHPUT + #check_iperf $ARCHIVES_LOC/$IPERF_LOG_FILE $THROUGHPUT j=$[$j+1] done fi