From 942f38c41889d031f0ae2286b41371d8f8d5f816 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Mon, 27 Sep 2021 17:32:42 -0500 Subject: [PATCH] Prueba concurrente de iperf --- scripts/test-iperf-concurrent | 36 +++++++++++++++++++++++++++++++++++ scripts/test-ping | 24 +++++++++++++++-------- 2 files changed, 52 insertions(+), 8 deletions(-) create mode 100755 scripts/test-iperf-concurrent diff --git a/scripts/test-iperf-concurrent b/scripts/test-iperf-concurrent new file mode 100755 index 0000000..b93a284 --- /dev/null +++ b/scripts/test-iperf-concurrent @@ -0,0 +1,36 @@ +#!/bin/bash + +source scan-netdev +VLANS='110 218 222 226 306 321 480' +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 + +for VLAN in $VLANS ; 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=`sed 's/#.*$//' /etc/netdev/vlan.$VLAN.csv \ + | cut -d ',' -f 3 \ + | grep '^[0-9]' | sort` + for IP in $IP_LIST; do + echo -n "$IP - " + iperf3 -P 4 -p 52$MY_PORT \ + --logfile $OUTPUT_DIR/iperf/client.$IP.concurrent.log \ + -c $IP & + #echo $? + done + sleep 55 +done + diff --git a/scripts/test-ping b/scripts/test-ping index f240398..918fbe0 100755 --- a/scripts/test-ping +++ b/scripts/test-ping @@ -4,9 +4,17 @@ source scan-netdev VLANS='110 218 222 226 306 321 480' MY_DATE=`date +%Y-%m-%d_%H-%M-%S` +if [[ -n $1 ]] ; then + MTU=`echo $1 | sed 's/[^0-9]//g'` + if [[ "$MTU" != "" ]] ; then + MTU_P=" -s $MTU" + LABEL=".$MTU" + fi +fi + stat-bonding out > $OUTPUT_DIR/bonding.out -echo -n "START: " > $OUTPUT_DIR/ping.out -date >> $OUTPUT_DIR/ping.out +echo -n "START: " > $OUTPUT_DIR/ping$LABEL.out +date >> $OUTPUT_DIR/ping$LABEL.out for VLAN in $VLANS ; do if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then VLAN_CONF=`sed 's/#.*$//' /etc/netdev/vlan.$VLAN.csv \ @@ -20,13 +28,13 @@ for VLAN in $VLANS ; do | grep '^[0-9]' | sort` for IP in $IP_LIST; do echo -n "$IP - " \ - | tee -a $OUTPUT_DIR/ping.out - ping -c100 -W1 -f $IP \ + | tee -a $OUTPUT_DIR/ping$LABEL.out + ping -c100 -W1 $MTU_P -f $IP \ | grep 'received' \ - | tee -a $OUTPUT_DIR/ping.out + | tee -a $OUTPUT_DIR/ping$LABEL.out done done -echo -n "END: " >> $OUTPUT_DIR/ping.out -date >> $OUTPUT_DIR/ping.out -cp -vf $OUTPUT_DIR/ping.out $OUTPUT_DIR/ping-$MY_DATE.out +echo -n "END: " >> $OUTPUT_DIR/ping$LABEL.out +date >> $OUTPUT_DIR/ping$LABEL.out +cp -vf $OUTPUT_DIR/ping$LABEL.out $OUTPUT_DIR/ping-$MY_DATE$LABEL.out cp -vf $OUTPUT_DIR/bonding.out $OUTPUT_DIR/bonding-$MY_DATE.out