diff --git a/scripts/setup-iperf b/scripts/setup-iperf index e28478b..5f170e4 100755 --- a/scripts/setup-iperf +++ b/scripts/setup-iperf @@ -4,7 +4,7 @@ source scan-dmidecode mkdir -p $OUTPUT_DIR/iperf -for PORT in {5213..5235} ; do +for PORT in {5201..5235} ; do iperf3 -p $PORT \ --logfile $OUTPUT_DIR/iperf/server.$PORT.log \ --server --daemon diff --git a/scripts/stat-netdev b/scripts/stat-netdev index 60844c4..8fb617c 100755 --- a/scripts/stat-netdev +++ b/scripts/stat-netdev @@ -9,28 +9,23 @@ check_listed_mac () { fi } -for DEV in \ - `cat /proc/net/dev \ - | grep -v 'lo:' \ +DEVICES=`grep -v 'lo:' /proc/net/dev \ + | grep -v '\.[0-9]\+:' \ | grep ':' \ | cut -d ':' -f 1` -do + +for DEV in $DEVICES ; do ip link set $DEV up done sleep 1 while [[ 1 ]] ; do clear date - for DEV in \ - `cat /proc/net/dev \ - | grep -v 'lo:' \ - | grep ':' \ - | cut -d ':' -f 1` - do + for DEV in $DEVICES ; do MAC=`cat /sys/class/net/$DEV/address` - LISTED=`cat $OUTPUT_DIR/netdev.lst | grep $DEV` + LISTED=`grep $DEV $OUTPUT_DIR/netdev.lst` MATCHING_MAC=`echo $LISTED | grep $MAC` - LISTED_MAC=`cat $OUTPUT_DIR/netdev.lst | grep $MAC` + LISTED_MAC=`grep $MAC $OUTPUT_DIR/netdev.lst ` LISTED_DEV=`echo $LISTED_MAC | cut -d ' ' -f 1` LINKING=`cat /sys/class/net/$DEV/operstate` if [[ "$LINKING" == "up" ]] ; then @@ -50,9 +45,9 @@ while [[ 1 ]] ; do fi done for DEV in \ - `cat $OUTPUT_DIR/netdev.lst | sed 's/#.*$//' | cut -d ' ' -f 1` + `sed 's/#.*$//' $OUTPUT_DIR/netdev.lst | cut -d ' ' -f 1` do - STILL_THERE=`cat /proc/net/dev | grep $DEV` + STILL_THERE=`grep $DEV /proc/net/dev ` if [[ -z $STILL_THERE ]] ; then echo "$BLD$DEV$OFF $RES_ERROR: Device missing" #check_listed_mac diff --git a/scripts/test-iperf b/scripts/test-iperf index cc23661..13fc4a0 100755 --- a/scripts/test-iperf +++ b/scripts/test-iperf @@ -1,7 +1,7 @@ #!/bin/bash source scan-netdev -VLANS='110 218 222 226 306 321 480' +#VLANS='110 218 222 226 306 321 480' CTLPLANE=110 MY_DATE=`date +%Y-%m-%d_%H-%M-%S` mkdir -p $OUTPUT_DIR/iperf @@ -17,10 +17,12 @@ if [[ -z $MY_PORT ]] ; then exit 27 fi -for VLAN in $VLANS ; do +for VLAN in {10..4000} ; do if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then VLAN_CONF=`grep $SERVER_SERIAL \ /etc/netdev/vlan.$VLAN.csv` + else + continue fi if [[ -z $VLAN_CONF ]] ; then continue diff --git a/scripts/test-ping b/scripts/test-ping index 918fbe0..1646877 100755 --- a/scripts/test-ping +++ b/scripts/test-ping @@ -1,7 +1,7 @@ #!/bin/bash source scan-netdev -VLANS='110 218 222 226 306 321 480' +#VLANS='110 218 222 226 306 321 480' MY_DATE=`date +%Y-%m-%d_%H-%M-%S` if [[ -n $1 ]] ; then @@ -15,10 +15,12 @@ fi stat-bonding out > $OUTPUT_DIR/bonding.out echo -n "START: " > $OUTPUT_DIR/ping$LABEL.out date >> $OUTPUT_DIR/ping$LABEL.out -for VLAN in $VLANS ; do +for VLAN in {10..4000} ; do if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then VLAN_CONF=`sed 's/#.*$//' /etc/netdev/vlan.$VLAN.csv \ | grep $SERVER_SERIAL ` + else + continue fi if [[ -z $VLAN_CONF ]] ; then continue