2021-11-03 13:09:54 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source scan-netdev
|
|
|
|
VLAN=110
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
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 \
|
|
|
|
| grep 'CDMXV-OSP' \
|
|
|
|
| cut -d ',' -f 3 \
|
|
|
|
| grep '^[0-9]' | sort`
|
|
|
|
for IP in $IP_LIST; do
|
|
|
|
echo -n "$IP - "
|
2021-11-03 13:14:52 -05:00
|
|
|
iperf3 -P 4 -t 900 -p 52$MY_PORT \
|
|
|
|
--logfile $OUTPUT_DIR/iperf/client.$IP.fallback.log \
|
2021-11-03 13:09:54 -05:00
|
|
|
-c $IP &
|
|
|
|
#echo $?
|
|
|
|
done
|
2021-11-03 13:16:54 -05:00
|
|
|
sleep 900
|
2021-11-03 13:09:54 -05:00
|
|
|
|