mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-04-19 08:55:15 +00:00
Many bug fixes & improvements to iperf tests; updated example output
This commit is contained in:
parent
b0c1cf6658
commit
bf010d7285
31
README.md
31
README.md
@ -23,27 +23,32 @@ This script isn't an attempt to be a golden standard. It's just yet another benc
|
|||||||
# https://github.com/masonr/yet-another-bench-script #
|
# https://github.com/masonr/yet-another-bench-script #
|
||||||
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
|
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
|
||||||
|
|
||||||
Thu Oct 3 10:16:52 EDT 2019
|
Thu 03 Oct 2019 10:25:48 PM EDT
|
||||||
|
|
||||||
Basic System Information:
|
Basic System Information:
|
||||||
---------------------------------
|
---------------------------------
|
||||||
Processor: Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
|
Processor : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
|
||||||
CPU cores: 4 @ 3499.732 MHz
|
CPU cores : 4 @ 3499.996 MHz
|
||||||
RAM : 1.0G
|
AES-NI : ✔ Enabled
|
||||||
|
VM-x/AMD-V : ❌ Disabled
|
||||||
|
RAM : 3.9Gi
|
||||||
|
Swap : 511Mi
|
||||||
|
Disk : 66G
|
||||||
|
|
||||||
iperf3 Speed Tests:
|
iperf3 Speed Tests:
|
||||||
---------------------------------
|
---------------------------------
|
||||||
Provider | Location (Link) | Send Speed | Recv Speed
|
Provider | Location (Link) | Send Speed | Recv Speed
|
||||||
| | |
|
| | |
|
||||||
Bouygues Telecom | Paris, FR (10G) | busy | busy
|
Bouygues Telecom | Paris, FR (10G) | 65.3 Mbits/sec | 179 Mbits/sec
|
||||||
Online.net | Paris, FR (10G) | 837 Mbits/sec | 833 Mbits/sec
|
Online.net | Paris, FR (10G) | 892 Mbits/sec | 553 Mbits/sec
|
||||||
Severius | Netherlands (10G) | 694 Mbits/sec | 742 Mbits/sec
|
Severius | The Netherlands (10G) | 80.0 Mbits/sec | 133 Mbits/sec
|
||||||
Worldstream | Netherlands (10G) | 773 Mbits/sec | 668 Mbits/sec
|
Worldstream | The Netherlands (10G) | 77.9 Mbits/sec | 122 Mbits/sec
|
||||||
wilhelm.tel | Hamburg, DE (10G) | busy | busy
|
wilhelm.tel | Hamburg, DE (10G) | 79.7 Mbits/sec | 126 Mbits/sec
|
||||||
Biznet | Bogor, ID (1G) | 288 Mbits/sec | 318 Mbits/sec
|
Biznet | Bogor, Indonesia (1G) | 0.00 bits/sec | 0.00 bits/sec
|
||||||
Velocity Online | Tallahassee, FL, US (?G) | 906 Mbits/sec | 854 Mbits/sec
|
Hostkey | Moscow, RU (1G) | 864 Mbits/sec | 882 Mbits/sec
|
||||||
Airstream Communications | Eau Claire, WI, US (10G) | 880 Mbits/sec | 654 Mbits/sec
|
Velocity Online | Tallahassee, FL, US (?G) | 90.4 Mbits/sec | 211 Mbits/sec
|
||||||
Hurricane Electric | Fremont, CA, US (1G) | 632 Mbits/sec | busy
|
Airstream Communications | Eau Claire, WI, US (10G) | 57.8 Mbits/sec | 127 Mbits/sec
|
||||||
|
Hurricane Electric | Fremont, CA, US (1G) | 4.89 Mbits/sec | 102 Mbits/sec
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
58
yabs.sh
58
yabs.sh
@ -13,14 +13,24 @@ echo -e
|
|||||||
echo -e "Basic System Information:"
|
echo -e "Basic System Information:"
|
||||||
echo -e "---------------------------------"
|
echo -e "---------------------------------"
|
||||||
CPU_PROC=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
CPU_PROC=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||||
echo -e "Processor: $CPU_PROC"
|
echo -e "Processor : $CPU_PROC"
|
||||||
CPU_CORES=$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)
|
CPU_CORES=$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)
|
||||||
CPU_FREQ=$(awk -F: ' /cpu MHz/ {freq=$2} END {print freq " MHz"}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
CPU_FREQ=$(awk -F: ' /cpu MHz/ {freq=$2} END {print freq " MHz"}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||||
echo -e "CPU cores: $CPU_CORES @ $CPU_FREQ"
|
echo -e "CPU cores : $CPU_CORES @ $CPU_FREQ"
|
||||||
|
CPU_AES=$(cat /proc/cpuinfo | grep aes)
|
||||||
|
[[ -z "$CPU_AES" ]] && CPU_AES="\xE2\x9D\x8C Disabled" || CPU_AES="\xE2\x9C\x94 Enabled"
|
||||||
|
echo -e "AES-NI : $CPU_AES"
|
||||||
|
CPU_VIRT=$(cat /proc/cpuinfo | grep 'vmx|svm')
|
||||||
|
[[ -z "$CPU_VIRT" ]] && CPU_VIRT="\xE2\x9D\x8C Disabled" || CPU_VIRT="\xE2\x9C\x94 Enabled"
|
||||||
|
echo -e "VM-x/AMD-V : $CPU_VIRT"
|
||||||
TOTAL_RAM=$(free -h | awk 'NR==2 {print $2}')
|
TOTAL_RAM=$(free -h | awk 'NR==2 {print $2}')
|
||||||
echo -e "RAM : $TOTAL_RAM"
|
echo -e "RAM : $TOTAL_RAM"
|
||||||
|
TOTAL_SWAP=$(free -h | grep Swap | awk '{ print $2 }')
|
||||||
|
echo -e "Swap : $TOTAL_SWAP"
|
||||||
|
TOTAL_DISK=$(df -h --total | grep total | awk '{ print $2 }')
|
||||||
|
echo -e "Disk : $TOTAL_DISK"
|
||||||
|
|
||||||
DATE=`date -Iseconds`
|
DATE=`date -Iseconds | sed -e "s/:/_/g"`
|
||||||
IPERF_PATH=/tmp/$DATE/iperf
|
IPERF_PATH=/tmp/$DATE/iperf
|
||||||
mkdir -p $IPERF_PATH
|
mkdir -p $IPERF_PATH
|
||||||
wget -O $IPERF_PATH/libiperf.so.0 https://iperf.fr/download/ubuntu/libiperf.so.0_3.1.3 -o /dev/null
|
wget -O $IPERF_PATH/libiperf.so.0 https://iperf.fr/download/ubuntu/libiperf.so.0_3.1.3 -o /dev/null
|
||||||
@ -29,17 +39,17 @@ chmod +x $IPERF_PATH/iperf3
|
|||||||
|
|
||||||
function iperf_test {
|
function iperf_test {
|
||||||
URL=$1
|
URL=$1
|
||||||
|
PORTS=$2
|
||||||
|
|
||||||
I=0
|
I=0
|
||||||
while [ $I -lt 10 ]
|
while [ $I -lt 10 ]
|
||||||
do
|
do
|
||||||
IPERF_RUN_SEND="$($IPERF_PATH/iperf3 -c $URL -P 8)"
|
PORT=`shuf -i $PORTS -n 1`
|
||||||
if [[ "$IPERF_RUN_SEND" != *"error"* ]]; then
|
IPERF_RUN_SEND="$(LD_LIBRARY_PATH=$IPERF_PATH timeout 15 $IPERF_PATH/iperf3 -c $URL -p $PORT -P 8)"
|
||||||
|
if [[ "$IPERF_RUN_SEND" == *"receiver"* && "$IPERF_RUN_SEND" != *"error"* ]]; then
|
||||||
I=10
|
I=10
|
||||||
#echo "iperf Send Success!!" # debug
|
|
||||||
else
|
else
|
||||||
I=$(( $I + 1 ))
|
I=$(( $I + 1 ))
|
||||||
#echo "iperf Send Failure..." # debug
|
|
||||||
sleep 3
|
sleep 3
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -47,11 +57,12 @@ function iperf_test {
|
|||||||
J=0
|
J=0
|
||||||
while [ $J -lt 10 ]
|
while [ $J -lt 10 ]
|
||||||
do
|
do
|
||||||
IPERF_RUN_RECV="$($IPERF_PATH/iperf3 -c $URL -P 8 -R)"
|
PORT=`shuf -i $PORTS -n 1`
|
||||||
if [[ "$IPERF_RUN_SEND" != *"error"* ]]; then
|
IPERF_RUN_RECV="$(LD_LIBRARY_PATH=$IPERF_PATH timeout 15 $IPERF_PATH/iperf3 -c $URL -p $PORT -P 8 -R)"
|
||||||
|
if [[ "$IPERF_RUN_RECV" == *"receiver"* && "$IPERF_RUN_RECV" != *"error"* ]]; then
|
||||||
J=10
|
J=10
|
||||||
else
|
else
|
||||||
J=$(( $I + 1 ))
|
J=$(( $J + 1 ))
|
||||||
sleep 3
|
sleep 3
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -61,18 +72,19 @@ function iperf_test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IPERF_LOCS=( \
|
IPERF_LOCS=( \
|
||||||
"bouygues.iperf.fr" "Bouygues Telecom" "Paris, FR (10G)" \
|
"bouygues.iperf.fr" "5200-5209" "Bouygues Telecom" "Paris, FR (10G)" \
|
||||||
"ping.online.net" "Online.net" "Paris, FR (10G)" \
|
"ping.online.net" "5200-5209" "Online.net" "Paris, FR (10G)" \
|
||||||
"speedtest.serverius.net -p 5002" "Severius" "Netherlands (10G)" \
|
"speedtest.serverius.net" "5002-5002" "Severius" "The Netherlands (10G)" \
|
||||||
"iperf.worldstream.nl" "Worldstream" "Netherlands (10G)" \
|
"iperf.worldstream.nl" "5201-5201" "Worldstream" "The Netherlands (10G)" \
|
||||||
"speedtest.wtnet.de" "wilhelm.tel" "Hamburg, DE (10G)" \
|
"speedtest.wtnet.de" "5200-5209" "wilhelm.tel" "Hamburg, DE (10G)" \
|
||||||
"iperf.biznetnetworks.com" "Biznet" "Bogor, ID (1G)" \
|
"iperf.biznetnetworks.com" "5201-5203" "Biznet" "Bogor, Indonesia (1G)" \
|
||||||
"iperf3.velocityonline.net" "Velocity Online" "Tallahassee, FL, US (?G)" \
|
"speedtest.hostkey.ru" "5200-5203" "Hostkey" "Moscow, RU (1G)" \
|
||||||
"iperf.airstreamcomm.net" "Airstream Communications" "Eau Claire, WI, US (10G)" \
|
"iperf3.velocityonline.net" "5201-5210" "Velocity Online" "Tallahassee, FL, US (?G)" \
|
||||||
"iperf.he.net" "Hurricane Electric" "Fremont, CA, US (1G)" \
|
"iperf.airstreamcomm.net" "5201-5205" "Airstream Communications" "Eau Claire, WI, US (10G)" \
|
||||||
|
"iperf.he.net" "5201-5201" "Hurricane Electric" "Fremont, CA, US (1G)" \
|
||||||
)
|
)
|
||||||
IPERF_LOCS_NUM=${#IPERF_LOCS[@]}
|
IPERF_LOCS_NUM=${#IPERF_LOCS[@]}
|
||||||
IPERF_LOCS_NUM=$((IPERF_LOCS_NUM / 3))
|
IPERF_LOCS_NUM=$((IPERF_LOCS_NUM / 4))
|
||||||
|
|
||||||
echo -e
|
echo -e
|
||||||
echo -e "iperf3 Speed Tests:"
|
echo -e "iperf3 Speed Tests:"
|
||||||
@ -81,14 +93,14 @@ printf "%-25s | %-25s | %-15s | %-15s\n" "Provider" "Location (Link)" "Send Spee
|
|||||||
printf "%-25s | %-25s | %-15s | %-15s\n"
|
printf "%-25s | %-25s | %-15s | %-15s\n"
|
||||||
|
|
||||||
for (( i = 0; i < IPERF_LOCS_NUM; i++ )); do
|
for (( i = 0; i < IPERF_LOCS_NUM; i++ )); do
|
||||||
iperf_test "${IPERF_LOCS[i*3]}"
|
iperf_test "${IPERF_LOCS[i*4]}" "${IPERF_LOCS[i*4+1]}"
|
||||||
IPERF_SENDRESULT_VAL=$(echo $IPERF_SENDRESULT | awk '{ print $6 }')
|
IPERF_SENDRESULT_VAL=$(echo $IPERF_SENDRESULT | awk '{ print $6 }')
|
||||||
IPERF_SENDRESULT_UNIT=$(echo $IPERF_SENDRESULT | awk '{ print $7 }')
|
IPERF_SENDRESULT_UNIT=$(echo $IPERF_SENDRESULT | awk '{ print $7 }')
|
||||||
IPERF_RECVRESULT_VAL=$(echo $IPERF_RECVRESULT | awk '{ print $6 }')
|
IPERF_RECVRESULT_VAL=$(echo $IPERF_RECVRESULT | awk '{ print $6 }')
|
||||||
IPERF_RECVRESULT_UNIT=$(echo $IPERF_RECVRESULT | awk '{ print $7 }')
|
IPERF_RECVRESULT_UNIT=$(echo $IPERF_RECVRESULT | awk '{ print $7 }')
|
||||||
[ -z "$IPERF_SENDRESULT_VAL" ] && IPERF_SENDRESULT_VAL="busy"
|
[ -z "$IPERF_SENDRESULT_VAL" ] && IPERF_SENDRESULT_VAL="busy"
|
||||||
[ -z "$IPERF_RECVRESULT_VAL" ] && IPERF_RECVRESULT_VAL="busy"
|
[ -z "$IPERF_RECVRESULT_VAL" ] && IPERF_RECVRESULT_VAL="busy"
|
||||||
printf "%-25s | %-25s | %-15s | %-15s\n" "${IPERF_LOCS[i*3+1]}" "${IPERF_LOCS[i*3+2]}" "$IPERF_SENDRESULT_VAL $IPERF_SENDRESULT_UNIT" "$IPERF_RECVRESULT_VAL $IPERF_RECVRESULT_UNIT"
|
printf "%-25s | %-25s | %-15s | %-15s\n" "${IPERF_LOCS[i*4+2]}" "${IPERF_LOCS[i*4+3]}" "$IPERF_SENDRESULT_VAL $IPERF_SENDRESULT_UNIT" "$IPERF_RECVRESULT_VAL $IPERF_RECVRESULT_UNIT"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -e
|
echo -e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user