#!/bin/bash source scan-dmidecode mkdir -p $OUTPUT_DIR/iperf for VLAN in 401 402 403 404 406 ; 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=`cat /etc/netdev/vlan.$VLAN.csv \ | grep -v 'STOC' \ | cut -d ',' -f 3 \ | grep '^[0-9]' | sort` for IP in $IP_LIST; do PORT=`echo $IP \ | cut -d '.' -f 3,4 \ | sed 's/\.//'` iperf3 -p $PORT \ --logfile $OUTPUT_DIR/iperf/server.$PORT.log \ --server --daemon done done