Soporte para todas las vLANs en test-ping y test-iperf
This commit is contained in:
parent
ee63874c72
commit
9935006f0c
4 changed files with 18 additions and 19 deletions
|
@ -4,7 +4,7 @@ source scan-dmidecode
|
||||||
|
|
||||||
mkdir -p $OUTPUT_DIR/iperf
|
mkdir -p $OUTPUT_DIR/iperf
|
||||||
|
|
||||||
for PORT in {5213..5235} ; do
|
for PORT in {5201..5235} ; do
|
||||||
iperf3 -p $PORT \
|
iperf3 -p $PORT \
|
||||||
--logfile $OUTPUT_DIR/iperf/server.$PORT.log \
|
--logfile $OUTPUT_DIR/iperf/server.$PORT.log \
|
||||||
--server --daemon
|
--server --daemon
|
||||||
|
|
|
@ -9,28 +9,23 @@ check_listed_mac () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
for DEV in \
|
DEVICES=`grep -v 'lo:' /proc/net/dev \
|
||||||
`cat /proc/net/dev \
|
| grep -v '\.[0-9]\+:' \
|
||||||
| grep -v 'lo:' \
|
|
||||||
| grep ':' \
|
| grep ':' \
|
||||||
| cut -d ':' -f 1`
|
| cut -d ':' -f 1`
|
||||||
do
|
|
||||||
|
for DEV in $DEVICES ; do
|
||||||
ip link set $DEV up
|
ip link set $DEV up
|
||||||
done
|
done
|
||||||
sleep 1
|
sleep 1
|
||||||
while [[ 1 ]] ; do
|
while [[ 1 ]] ; do
|
||||||
clear
|
clear
|
||||||
date
|
date
|
||||||
for DEV in \
|
for DEV in $DEVICES ; do
|
||||||
`cat /proc/net/dev \
|
|
||||||
| grep -v 'lo:' \
|
|
||||||
| grep ':' \
|
|
||||||
| cut -d ':' -f 1`
|
|
||||||
do
|
|
||||||
MAC=`cat /sys/class/net/$DEV/address`
|
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`
|
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`
|
LISTED_DEV=`echo $LISTED_MAC | cut -d ' ' -f 1`
|
||||||
LINKING=`cat /sys/class/net/$DEV/operstate`
|
LINKING=`cat /sys/class/net/$DEV/operstate`
|
||||||
if [[ "$LINKING" == "up" ]] ; then
|
if [[ "$LINKING" == "up" ]] ; then
|
||||||
|
@ -50,9 +45,9 @@ while [[ 1 ]] ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for DEV in \
|
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
|
do
|
||||||
STILL_THERE=`cat /proc/net/dev | grep $DEV`
|
STILL_THERE=`grep $DEV /proc/net/dev `
|
||||||
if [[ -z $STILL_THERE ]] ; then
|
if [[ -z $STILL_THERE ]] ; then
|
||||||
echo "$BLD$DEV$OFF $RES_ERROR: Device missing"
|
echo "$BLD$DEV$OFF $RES_ERROR: Device missing"
|
||||||
#check_listed_mac
|
#check_listed_mac
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source scan-netdev
|
source scan-netdev
|
||||||
VLANS='110 218 222 226 306 321 480'
|
#VLANS='110 218 222 226 306 321 480'
|
||||||
CTLPLANE=110
|
CTLPLANE=110
|
||||||
MY_DATE=`date +%Y-%m-%d_%H-%M-%S`
|
MY_DATE=`date +%Y-%m-%d_%H-%M-%S`
|
||||||
mkdir -p $OUTPUT_DIR/iperf
|
mkdir -p $OUTPUT_DIR/iperf
|
||||||
|
@ -17,10 +17,12 @@ if [[ -z $MY_PORT ]] ; then
|
||||||
exit 27
|
exit 27
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for VLAN in $VLANS ; do
|
for VLAN in {10..4000} ; do
|
||||||
if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then
|
if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then
|
||||||
VLAN_CONF=`grep $SERVER_SERIAL \
|
VLAN_CONF=`grep $SERVER_SERIAL \
|
||||||
/etc/netdev/vlan.$VLAN.csv`
|
/etc/netdev/vlan.$VLAN.csv`
|
||||||
|
else
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
if [[ -z $VLAN_CONF ]] ; then
|
if [[ -z $VLAN_CONF ]] ; then
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source scan-netdev
|
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`
|
MY_DATE=`date +%Y-%m-%d_%H-%M-%S`
|
||||||
|
|
||||||
if [[ -n $1 ]] ; then
|
if [[ -n $1 ]] ; then
|
||||||
|
@ -15,10 +15,12 @@ fi
|
||||||
stat-bonding out > $OUTPUT_DIR/bonding.out
|
stat-bonding out > $OUTPUT_DIR/bonding.out
|
||||||
echo -n "START: " > $OUTPUT_DIR/ping$LABEL.out
|
echo -n "START: " > $OUTPUT_DIR/ping$LABEL.out
|
||||||
date >> $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
|
if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then
|
||||||
VLAN_CONF=`sed 's/#.*$//' /etc/netdev/vlan.$VLAN.csv \
|
VLAN_CONF=`sed 's/#.*$//' /etc/netdev/vlan.$VLAN.csv \
|
||||||
| grep $SERVER_SERIAL `
|
| grep $SERVER_SERIAL `
|
||||||
|
else
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
if [[ -z $VLAN_CONF ]] ; then
|
if [[ -z $VLAN_CONF ]] ; then
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue