iperf3/test_commands.sh

74 lines
1.9 KiB
Bash
Raw Permalink Normal View History

2013-12-21 02:46:24 +04:00
#!/bin/sh
#
# This is a set of commands to run and verify they work before doing a new release.
2021-09-03 16:24:55 +03:00
# Eventually they should also use the -J flag to generate JSON output, and a program should
2013-12-21 02:46:24 +04:00
# be written to check the output.
# Be sure to test both client and server on Linux, BSD, and OSX
#
if [ $# -ne 1 ]
then
2021-09-03 16:48:55 +03:00
echo "Usage: `basename "$0"` hostname"
2013-12-21 02:46:24 +04:00
exit $E_BADARGS
fi
set -x
host=$1
# basic testing
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -V -t 5 -T "test1"
./src/iperf3 -c "$host" -u -V -t 5
2013-12-21 02:46:24 +04:00
# omit mode
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -i .3 -O 2 -t 5
2013-12-21 02:46:24 +04:00
# JSON mode
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -i 1 -J -t 5
2013-12-21 02:46:24 +04:00
# force V4
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -4 -t 5
./src/iperf3 -c "$host" -4 -u -t 5
2013-12-21 02:46:24 +04:00
# force V6
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -6 -t 5
./src/iperf3 -c "$host" -6 -u -t 5
# FQ rate
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -V -t 5 --fq-rate 5m
./src/iperf3 -c "$host" -u -V -t 5 --fq-rate 5m
# SCTP
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" --sctp -V -t 5
2013-12-21 02:46:24 +04:00
# parallel streams
2021-09-03 16:24:55 +03:00
./src/iperf3 -c "$host" -P 3 -t 5
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -u -P 3 -t 5
2013-12-21 02:46:24 +04:00
# reverse mode
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -P 2 -t 5 -R
./src/iperf3 -c "$host" -u -P 2 -t 5 -R
# bidirectional mode
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -P 2 -t 5 --bidir
./src/iperf3 -c "$host" -u -P 2 -t 5 --bidir
2013-12-21 02:46:24 +04:00
# zero copy
2021-09-03 16:24:55 +03:00
./src/iperf3 -c "$host" -Z -t 5
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -Z -t 5 -R
2013-12-21 02:46:24 +04:00
# window size
2021-09-03 16:24:55 +03:00
./src/iperf3 -c "$host" -t 5 -w 8M
2013-12-21 02:46:24 +04:00
# -n flag
2021-09-03 16:24:55 +03:00
./src/iperf3 -c "$host" -n 5M
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -n 5M -u -b1G
# -n flag with -R
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -n 5M -R
./src/iperf3 -c "$host" -n 5M -u -b1G -R
2013-12-21 02:46:24 +04:00
# conflicting -n -t flags
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -n 5M -t 5
2013-12-21 02:46:24 +04:00
# -k mode
2021-09-03 16:24:55 +03:00
./src/iperf3 -c "$host" -k 1K
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -k 1K -u -b1G
# -k mode with -R
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -k 1K -R
./src/iperf3 -c "$host" -k 1K -u -b1G -R
2013-12-21 02:46:24 +04:00
# CPU affinity
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -A 2/2
./src/iperf3 -c "$host" -A 2/2 -u -b1G
2013-12-21 02:46:24 +04:00
# Burst mode
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -u -b1G/100
2013-12-21 02:46:24 +04:00
# change MSS
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -M 1000 -V
2013-12-21 03:05:21 +04:00
# test congestion control option (linux only)
2021-09-03 16:48:55 +03:00
./src/iperf3 -c "$host" -C reno -V