Prueba concurrente de iperf
This commit is contained in:
parent
b736a8b842
commit
942f38c418
2 changed files with 52 additions and 8 deletions
36
scripts/test-iperf-concurrent
Executable file
36
scripts/test-iperf-concurrent
Executable file
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue