mirror of
https://github.com/AuxXxilium/yet-another-bench-script.git
synced 2024-11-23 23:01:02 +07:00
Removed IPv6 command (GitHub now supports v6)
This commit is contained in:
parent
3434f50e69
commit
46f4ba2a88
10
README.md
10
README.md
@ -23,8 +23,6 @@ This script has been tested on the following Linux distributions: CentOS 6+, Deb
|
||||
|
||||
**Experimental ARM Compatibility**: Initial ARM compatibilty has been introduced, however, is not considered entirely stable due to limited testing on distinct ARM devices. Report any errors or issues.
|
||||
|
||||
**IPv6-Only Machines**: The above command will not work on IPv6-only machines. [See below](#ipv6-only-machines).
|
||||
|
||||
**High Bandwidth Usage Notice**: By default, this script will perform many iperf network tests, which will try to max out the network port for ~20s per location (10s in each direction). Low-bandwidth servers (such as a NAT VPS) should consider running this script with the `-r` flag (for reduced iperf locations) or the `-i` flag (to disable network tests entirely).
|
||||
|
||||
### Flags (Skipping Tests, Reducing iperf Locations, Geekbench 4, etc.)
|
||||
@ -136,14 +134,6 @@ Full Test | https://browser.geekbench.com/v5/cpu/3844555
|
||||
|
||||
```
|
||||
|
||||
## IPv6 Only Machines
|
||||
|
||||
GitHub's CDN does not resolve via IPv6. You will need to run the following command to download and run the script.
|
||||
|
||||
`curl -s -k -g --header 'Host: raw.githubusercontent.com' "https://[2a04:4e42::133]/masonr/yet-another-bench-script/master/yabs.sh" | bash`
|
||||
|
||||
(2a04:4e42::133 is fastly.net's [GitHub's CDN Provider] IPv6 address)
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
This script was inspired by several great benchmarking scripts out there, including, but not limited to, [bench.sh](https://bench.sh/), [nench.sh](https://github.com/n-st/nench), [ServerBench](https://github.com/K4Y5/ServerBench), among others. Members of the [HostedTalk](https://hostedtalk.net), [LowEndSpirit](https://talk.lowendspirit.com), and [LowEndTalk](https://www.lowendtalk.com) hosting-related communities play a pivotal role in testing, evaluating, and shaping this script as it matures.
|
||||
|
20
yabs.sh
20
yabs.sh
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Yet Another Bench Script by Mason Rowe
|
||||
# Initial Oct 2019; Last update Dec 2021
|
||||
# Initial Oct 2019; Last update Feb 2022
|
||||
#
|
||||
# Disclaimer: This project is a work in progress. Any errors or suggestions should be
|
||||
# relayed to me via the GitHub project page linked below.
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
|
||||
echo -e '# Yet-Another-Bench-Script #'
|
||||
echo -e '# v2021-12-28 #'
|
||||
echo -e '# v2022-02-18 #'
|
||||
echo -e '# https://github.com/masonr/yet-another-bench-script #'
|
||||
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
|
||||
|
||||
@ -82,6 +82,10 @@ command -v iperf3 >/dev/null 2>&1 && LOCAL_IPERF=true || unset LOCAL_IPERF
|
||||
# test if the host has IPv4/IPv6 connectivity
|
||||
IPV4_CHECK=$((ping -4 -c 1 -W 4 ipv4.google.com >/dev/null 2>&1 && echo true) || curl -s -4 -m 4 icanhazip.com 2> /dev/null)
|
||||
IPV6_CHECK=$((ping -6 -c 1 -W 4 ipv6.google.com >/dev/null 2>&1 && echo true) || curl -s -6 -m 4 icanhazip.com 2> /dev/null)
|
||||
if [[ -z "$IPV4_CHECK" && -z "$IPV6_CHECK" ]]; then
|
||||
echo -e
|
||||
echo -e "Warning: Both IPv4 AND IPv6 connectivity were not detected. Check for DNS issues..."
|
||||
fi
|
||||
|
||||
# print help and exit script, if help flag was passed
|
||||
if [ ! -z "$PRINT_HELP" ]; then
|
||||
@ -443,11 +447,7 @@ elif [ -z "$SKIP_FIO" ]; then
|
||||
FIO_CMD=fio
|
||||
else
|
||||
# download fio binary
|
||||
if [ ! -z "$IPV4_CHECK" ]; then # if IPv4 is enabled
|
||||
curl -s -4 --connect-timeout 5 --retry 5 --retry-delay 0 https://raw.githubusercontent.com/masonr/yet-another-bench-script/master/bin/fio/fio_$ARCH -o $DISK_PATH/fio
|
||||
else # no IPv4, use IPv6 - below is necessary since raw.githubusercontent.com has no AAAA record
|
||||
curl -s -6 --connect-timeout 5 --retry 5 --retry-delay 0 -k -g --header 'Host: raw.githubusercontent.com' https://[2a04:4e42::133]/masonr/yet-another-bench-script/master/bin/fio/fio_$ARCH -o $DISK_PATH/fio
|
||||
fi
|
||||
curl -s --connect-timeout 5 --retry 5 --retry-delay 0 https://raw.githubusercontent.com/masonr/yet-another-bench-script/master/bin/fio/fio_$ARCH -o $DISK_PATH/fio
|
||||
|
||||
if [ ! -f "$DISK_PATH/fio" ]; then # ensure fio binary download successfully
|
||||
echo -en "\r\033[0K"
|
||||
@ -640,11 +640,7 @@ if [ -z "$SKIP_IPERF" ]; then
|
||||
mkdir -p $IPERF_PATH
|
||||
|
||||
# download iperf3 binary
|
||||
if [ ! -z "$IPV4_CHECK" ]; then # if IPv4 is enabled
|
||||
curl -s -4 --connect-timeout 5 --retry 5 --retry-delay 0 https://raw.githubusercontent.com/masonr/yet-another-bench-script/master/bin/iperf/iperf3_$ARCH -o $IPERF_PATH/iperf3
|
||||
else # no IPv4, use IPv6 - below is necessary since raw.githubusercontent.com has no AAAA record
|
||||
curl -s -6 --connect-timeout 5 --retry 5 --retry-delay 0 -k -g --header 'Host: raw.githubusercontent.com' https://[2a04:4e42::133]/masonr/yet-another-bench-script/master/bin/iperf/iperf3_$ARCH -o $IPERF_PATH/iperf3
|
||||
fi
|
||||
curl -s --connect-timeout 5 --retry 5 --retry-delay 0 https://raw.githubusercontent.com/masonr/yet-another-bench-script/master/bin/iperf/iperf3_$ARCH -o $IPERF_PATH/iperf3
|
||||
|
||||
if [ ! -f "$IPERF_PATH/iperf3" ]; then # ensure iperf3 binary downloaded successfully
|
||||
IPERF_DL_FAIL=True
|
||||
|
Loading…
Reference in New Issue
Block a user