本文主要收集VPS常用测试脚本代码,其内容收集于网络,在之前的文章中陆陆续续推送一些,现在整理一下,方便查询;其中主要包括VPS硬件信息、硬盘IO speed读写测试、speedtest国内国外节点下载测速,ping网络延迟,Trace去程回程路由,一键开启BBR等等的测试代码。
1、在测试的过程中,在执行wegt命令的时候提示:“-bash: wget: command not found”错误,即需要安装wget或者curl,具体的操作环境与代码如下:
- Centos系统:
yum install wget -y
- Ubuntu / Debian系统:
apt install -y wget
- Centos系统:
yum install curl -y
- Ubuntu / Debian系统:
apt-get update && apt-get install curl
2、VPS、云服务器常用一键测试脚本汇总如下:
(1)Bench.sh脚本,服务器基本信息与IO读写,测速
wget -qO- bench.sh | bash
(2)superbench脚本,服务器基本信息与IO读写、测速
wget -qO- git.io/superbench.sh | bash
(3)亚洲节点测速
curl -LsO bench.monster/speedtest.sh; bash speedtest.sh -Asia
(4)全球节点测速
curl -LsO bench.monster/speedtest.sh; bash speedtest.sh -Global
(5)superbench+欧美节点测速
wget -qO- http://depot.treesky.link/speedtest/n/superbench_f.sh | bash
(6)国内三网测速
bash <(curl -Lso- https://git.io/superspeed)
(7)海外使用较多的脚本,包括AES指令集是/否,硬盘读写:4k 64k 512k 1m文件读写 (IOPS测试),国外节点测速 GB5 benchmark
curl -sL yabs.sh | bash -s -- -r
说明:如果没有安装iperf3,可以通过执行yum install iperf3即可安装!
(8)回程路由测试1
wget -qO- git.io/besttrace | bash 或者 wget -qO- git.io/fphX1 | bash
(9)回程路由测试2
wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh bash testrace.sh
(10)去程丢包率在线测试
https://ping.pe/
(11)Best Trace路由跟踪
#下载 wget https://cdn.ipip.net/17mon/besttrace4linux.zip #解压 unzip besttrace4linux.zip -d best cd best chmod +x besttrace ./besttrace -q 1 目标IP
(12)UnixBench跑分测试
wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh chmod +x unixbench.sh ./unixbench.sh
(13)流媒体是否支持检测
bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh") 或者 首先执行:yum install -y curl 在执行下面的: bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
(14)Linux Centos 一键开启BBR脚本
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
(15)检测VPS真实可分配内存
#CentOS / RHEL yum install wget -y yum groupinstall "Development Tools" -y wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp gcc -l stdc++ memtester.cpp ./a.out
#Ubuntu / Debian apt-get update apt-get install wget build-essential -y wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp gcc -l stdc++ memtester.cpp ./a.out
(16)独服测试硬件脚本
wget -q https://github.com/Aniverse/A/raw/i/a && bash a
(17)Zbench 国内综合性脚本
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh && bash ZBench-CN.sh 或者 wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
(18)superbenchpro
bash <(wget --no-check-certificate -O- https://dl.233.mba/sh/superbenchpro.sh)
后续有更新的在更新!