星罗棋布:VPS测试脚本集锦

引言

莫忧世事兼身事,须著人间比梦间。 ——勿埋我心

  当我们获得一个服务器后,会想知道它的性能如何?宝塔自带跑分的应用,但是测试的数据比较片面,所以就有了各种各样的测试脚本。
  勿埋我心带你了解一下有哪些常用的VPS测试脚本。

网络类测试脚本

一、带宽测试

① oooldking 原版

  GitHub 主页:https://github.com/oooldking/script

使用方法:

wget https://raw.githubusercontent.com/oooldking/script/master/superspeed.sh
chmod +x superspeed.sh
./superspeed.sh

原版目前已经不再更新,勿埋我心建议使用第二个版本。

② ernisn 版本(推荐)

  GitHub 主页:https://github.com/ernisn/superspeed

使用方法:

bash <(curl -Lso- https://git.io/superspeed)

二、Ping值测试

  uPing:一个24小时监测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

三、回程路由测试

  从你的 Linux(X86/ARM)/Mac/BSD 系统环境下发起 traceroute 请求,附带链路可视化,兼容性更好,支持 JSON 格式

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

#解压
unzip besttrace4linux.zip

#使用
./besttrace -q 1 xxqiantigersxx #"xxqiantigersxx"替换为目标IP

性能类测试脚本

一、内存检测脚本

  检测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)统下的性能测试工具,一个开源工具,被广泛用与测试linux系统主机的性能。Unixbench的主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。

使用方法:

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

综合类测试脚本

  这类脚本是综合测试VPS基础信息、硬盘IO、带宽和网络延迟等项目的一键式脚本。

一、Bench.sh脚本

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

特点:

  1. 显示当前测试的各种系统信息;
  2. 取自世界多处的知名数据中心的测试点,下载测试比较全面;
  3. 支持 IPv6 下载测速;
  4. 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

二、SuperBench测试脚本

  这个脚本是在基于Bench.sh脚本的基础上,加入了独服通电时间,服务器虚拟化架构等内容
  Github:https://github.com/oooldking/script/blob/master/superbench.sh

特点:

  1. 改进了显示的模式,基本参数添加了颜色,方面区分与查找。
  2. I/O测试,更改了原来默认的测试的内容,采用小文件,中等文件,大文件,分别测试IO性能,然后取平均值。
  3. 速度测试替换成了 Superspeed 里面的测试,第一个默认节点是,Speedtest 默认,其他分别测试到中国电信,联通,移动,各三个不同地区的速度。

使用方法:

#第一种方法
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

三、Zbench测试脚本

  脚本由漏水和kirito,基于Oldking大佬 的 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

四、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

结语

  感谢这些优秀作者开发的脚本,希望它们为你甄别优秀的服务器。欢迎有疑惑在勿埋我心评论区留言。

打赏
评论区
头像
    头像
    wizi
      

    如果内存检测脚本有问题的话,可以尝试这个 https://www.xxorg.com/archives/4409

    头像

    [...]文章来源:星罗棋布:VPS测试脚本集锦 – 勿埋我心[...]

文章目录