hw-test/scripts/test-iperf-concurrent

37 lines
778 B
Text
Raw Normal View History

2021-09-27 17:32:42 -05:00
#!/bin/bash
source scan-netdev
VLANS='110 218 222 226 306 321 480'
CTLPLANE=110
MY_DATE=`date +%Y-%m-%d_%H-%M-%S`
mkdir -p $OUTPUT_DIR/iperf
MY_PORT=`grep $SERVER_SERIAL /etc/netdev/vlan.$CTLPLANE.csv \
| cut -d ',' -f 3 | cut -d '.' -f 4`
if [[ -z $MY_PORT ]] ; then
echo "My Port empty"
exit 27
fi
for VLAN in $VLANS ; do
if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then
VLAN_CONF=`grep $SERVER_SERIAL \
/etc/netdev/vlan.$VLAN.csv`
fi
if [[ -z $VLAN_CONF ]] ; then
continue
fi
IP_LIST=`sed 's/#.*$//' /etc/netdev/vlan.$VLAN.csv \
| cut -d ',' -f 3 \
| grep '^[0-9]' | sort`
for IP in $IP_LIST; do
echo -n "$IP - "
iperf3 -P 4 -p 52$MY_PORT \
--logfile $OUTPUT_DIR/iperf/client.$IP.concurrent.log \
-c $IP &
#echo $?
done
sleep 55
done