Soporte para todas las vLANs en test-ping y test-iperf

This commit is contained in:
Sandino Araico Sánchez 2021-11-25 00:28:14 -06:00
parent ee63874c72
commit 9935006f0c
4 changed files with 18 additions and 19 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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