在平时测试VPS时,我们常常需要使用各种脚本来评估其性能。为了方便自己和大家,我整理了以下几个常用的VPS性能测试脚本,供参考使用。

综合测试脚本

这些脚本能一键测试VPS的基础信息、硬盘IO、带宽、网络延迟等多个指标,帮助快速了解VPS的整体性能。

1. 秋水逸冰的 Bench.sh

特点:

  • 显示当前测试的系统信息;
  • 提供来自世界各地知名数据中心的测试点,确保下载测试全面;
  • 支持IPv6下载测速;
  • IO测试执行三次,最终显示平均值。

命令:

wget -qO- bench.sh | bash  
# 或者  
curl -Lso- bench.sh | bash  
# 或者  
wget -qO- 86.re/bench.sh | bash  
# 或者  
curl -so- 86.re/bench.sh | bash  

Github:https://github.com/teddysun/across/blob/master/bench.sh

2. 老鬼大佬的 SuperBench 测试脚本

该脚本基于秋水大佬的脚本,增加了独立服务器通电时间、虚拟化架构等信息。
特点:

  • 改进了显示模式,基本参数加入了颜色,方便区分;
  • IO测试采用不同文件大小(小、中、大文件)分别测试IO性能,取平均值;
  • 替换了测速工具,测试节点涵盖了中国电信、联通、移动的不同地区。

命令:

wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash  
# 或者  
curl -Lso- -no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash  

Github:https://github.com/oooldking/script/blob/master/superbench.sh

3. Zbench

Zbench 是基于 SuperBench 脚本,加入了 Ping 测试和路由测试功能,并支持生成测评报告,方便分享给他人查看。
命令:

# 中文版  
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh && bash ZBench-CN.sh  
# 英文版  
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh && bash ZBench.sh  

4. LemonBench

LemonBench(也叫LBench,柠檬Bench)是一款专为Linux服务器设计的性能测试工具,能够快速评估服务器的综合性能。
命令:

curl -fsSL https://ilemonrain.com/download/shell/LemonBench.sh | bash  
# 或者  
wget -qO- https://ilemonrain.com/download/shell/LemonBench.sh | bash  

内存检测脚本

用于检测VPS的真实可分配内存,以帮助识别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  

UnixBench 测试脚本

UnixBench 是一款类 Unix 系统下的性能测试工具,适用于 Unix、BSD、Linux 系统。它的测试项目包括系统调用、读写、进程、图形化测试等。
使用方法:

wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh  
chmod +x unixbench.sh  
./unixbench.sh  

带宽测试

使用SpeedTest进行带宽测试。

Ping 值测试

uPing 是一个 24 小时监控 VPS 延迟的工具,适用于长期监测VPS的延迟变化。
依赖安装:

# Debian / Ubuntu  
apt-get update  
apt-get install python wget screen -y  

# CentOS / RHEL  
yum install screen wget python -y  

使用方法:

screen -S uping  
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/uPing/master/uping.py  
python uping.py  

回程路由测试

使用 besttrace 工具测试回程路由,支持发起 traceroute 请求并显示链路可视化信息。
下载与使用:

# 下载  
wget https://cdn.ipip.net/17mon/besttrace4linux.zip  

# 解压  
unzip besttrace4linux.zip  

# 使用  
./besttrace -q 1 <目标IP>

在这份优化的文档中,我已为每个脚本和工具添加了适当的描述、使用命令,并保留了各自的Github链接。此外,结构更加清晰,便于查阅和理解。

标签: VPS性能测试, 网络延迟

相关文章

在购买搬瓦工 VPS 后,很多新手朋友不知道该怎么去使用。因为这个 VPS 看不见、摸不着,所以我们需要先通过一些 SSH 软件远程登录 VPS 后,再进行使用。这里分享一下通过 SSH 软件登...

之前有写过搬瓦工手动续费的教程,但是很多时候我们会忘记去续费,这种情况下我们的 VPS 将会被停机直至被删除,被删除后我们的数据也就永久丢失了。站长本次就来分享下自动续费教程,这样我们就不用总惦...

添加新评论