mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Update bench.sh (#101)
This commit is contained in:
parent
65b704bf8a
commit
e8b49cae14
10
bench.sh
10
bench.sh
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Description: Auto test download & I/O speed script
|
# Description: A Bench Script by Teddysun
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015 - 2022 Teddysun <i@teddysun.com>
|
# Copyright (C) 2015 - 2022 Teddysun <i@teddysun.com>
|
||||||
# Thanks: LookBack <admin@dwhd.org>
|
# Thanks: LookBack <admin@dwhd.org>
|
||||||
@ -144,6 +144,8 @@ check_virt(){
|
|||||||
virt="KVM"
|
virt="KVM"
|
||||||
elif [[ "${virtualx}" == *"VMware Virtual Platform"* ]]; then
|
elif [[ "${virtualx}" == *"VMware Virtual Platform"* ]]; then
|
||||||
virt="VMware"
|
virt="VMware"
|
||||||
|
elif [[ "${sys_product}" == *"VMware Virtual Platform"* ]]; then
|
||||||
|
virt="VMware"
|
||||||
elif [[ "${virtualx}" == *"Parallels Software International"* ]]; then
|
elif [[ "${virtualx}" == *"Parallels Software International"* ]]; then
|
||||||
virt="Parallels"
|
virt="Parallels"
|
||||||
elif [[ "${virtualx}" == *VirtualBox* ]]; then
|
elif [[ "${virtualx}" == *VirtualBox* ]]; then
|
||||||
@ -221,11 +223,12 @@ install_speedtest() {
|
|||||||
mkdir -p speedtest-cli && tar zxf speedtest.tgz -C ./speedtest-cli && chmod +x ./speedtest-cli/speedtest
|
mkdir -p speedtest-cli && tar zxf speedtest.tgz -C ./speedtest-cli && chmod +x ./speedtest-cli/speedtest
|
||||||
rm -f speedtest.tgz
|
rm -f speedtest.tgz
|
||||||
fi
|
fi
|
||||||
|
printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_intro() {
|
print_intro() {
|
||||||
echo "-------------------- A Bench.sh Script By Teddysun -------------------"
|
echo "-------------------- A Bench.sh Script By Teddysun -------------------"
|
||||||
echo " Version : $(_green v2022-02-22)"
|
echo " Version : $(_green v2022-06-01)"
|
||||||
echo " Usage : $(_red "wget -qO- bench.sh | bash")"
|
echo " Usage : $(_red "wget -qO- bench.sh | bash")"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,8 +361,7 @@ ipv4_info
|
|||||||
next
|
next
|
||||||
print_io_test
|
print_io_test
|
||||||
next
|
next
|
||||||
install_speedtest && printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency"
|
install_speedtest && speed && rm -fr speedtest-cli
|
||||||
speed && rm -fr speedtest-cli
|
|
||||||
next
|
next
|
||||||
print_end_time
|
print_end_time
|
||||||
next
|
next
|
||||||
|
Loading…
x
Reference in New Issue
Block a user