怎么做一个合格的mjj,测试VPS主机国内外服务器网络性能一键脚本,这里将所用的脚本、程序、软件和工具都汇个总,方便网友,也方便自己查找。

常用工具安装和相关命令
1.wget下载工具安装
如提示wget: command not found ,使用

yum install wget

apt-get install wget

命令安装。

2.解压工具安装
如提示bash: unzip: command not found,安装unzip命令:

yum -y install zip unzip


3.远程会话管理工具 - screen
执行:

screen -S vpstop

创建screen会话。

如果提示screen: command not found 命令不存在可以执行:

yum install screen

apt-get install screen

安装,详细内容参考screen教程。


如果网络掉线,可以重新连接SSH,再执行 screen -r vpstop 就会看到你的lnmp安装进程;
有时候screen异常退出可能会提示状态为Attached,可以执行:screen -D -r vpstop 进行恢复;
有时候可能会创建了多个同名的screen会话,可以执行:screen -ls 查看对应会话的session id,然后使用screen -D -r sessionid 进行恢复。

一、VPS配置测试
1.柠檬脚本
可测试配置、IO、CPU、内存、路由

curl -fsL https://ilemonra.in/LemonBenchIntl | bash -s fast

第二个方法用

wget -qO- https://ilemonra.in/LemonBenchIntl | bash -s full
   -f, --fast, fast                  执行快速测试   -F, --full, full                  执行完整测试   spfast, --speedtest-fast          仅执行Speedtest网速测试 (快速测试)   spfull, --speedtest-full          仅执行Speedtest网速测试 (完整测试)   dtfast, --disktest-fast          仅执行磁盘性能测试 (快速测试)   dtfull, --disktest-full          仅执行磁盘性能测试 (完整测试)   btfast, --besttrace-fast          仅执行路由追踪测试 (快速测试)   btfull, --besttrace-full          仅执行路由追踪测试 (完整测试)   spf, --spoofer                  仅执行Spoofer测试   sbcfast, --sbcfast                  仅执行CPU性能测试 (快速模式)   sbcfull, --sbcfull                  仅执行CPU性能测试 (标准模式)


2.专业测硬盘脚本
测IO和网速(可直接测IPv6的网速,国外节点)

curl -sL yabs.sh | bashwget -qO- yabs.sh | bash


3.磁盘通电时间和健康度检测

wget -c <a href="https://www.hdsentinel.com/hdslin/hdsentinel-019c-x64.gz" target="_blank">https://www.hdsentinel.com/hdslin/hdsentinel-019c-x64.gz</a>
gunzip  hdsentinel-019c-x64.gz 
chmod 755  hdsentinel-019c-x64 
./hdsentinel-019c-x64

4.UnixBench跑分测试
在安装 UnixBench 之前,要先准备好相关的依赖。请执行:

yum install perl-Time-HiRes libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make gcc


下载安装包,然后按下面的提示操作。官方的源在 googlecode 上,国内访问不便,我已经将文件上传到对象存储服务。

wget <a href="http://codingpy-1252715393.cosgz.myqcloud.com/archive/UnixBench5.1.3.tgz" target="_blank">http://codingpy-1252715393.cosgz ... /UnixBench5.1.3.tgz</a>tar xvf UnixBench5.1.3.tgzcd UnixBenchmake

运行 make 之前,确保将 Makefile 文件中 GRAPHICS_TEST = defined 行被注释掉,因为我们是在服务器端进行测试,不需要做 2D/3D 图形测试。

最后,执行:

./Run

如果一切正常,应该会出现类似下面的文字:



5、宝塔面板跑分插件
宝塔面板有一个跑分插件,可以作为参考。
宝塔面板官网:点击直达

二、速度和网络测试
1.SuperBench.sh
这是站长必用的工具,一个脚本整合了几个国内的测试点,还是比较方便的。Superspeed已更新为SuperBench.sh,整合了teddysun大佬的bench.sh脚本。

使用命令如下:

wget -qO- --no-check-certificate <a href="https://raw.githubusercontent.com/oooldking/script/master/superbench.sh" target="_blank">https://raw.githubusercontent.co ... aster/superbench.sh</a> | bash

柠檬和SuperBench都有一个测速脚本,不过都是基本的测试,节点很少。所以我们还可以使用下面的测速脚本:

2.superspeed
三网测速,可单独测试

bash <(curl -Lso- <a href="https://raw.githubusercontent.com/opear2008/superspeed/master/superspeed.sh" target="_blank">https://raw.githubusercontent.co ... aster/superspeed.sh</a>)

bash <(curl -Lso- <a href="https://git.io/J1SEh" target="_blank">https://git.io/J1SEh</a>)


3.superbenchpro
可测试配置、IO、跑分、网速

bash <(wget --no-check-certificate -O- <a href="https://dl.233.mba/sh/superbenchpro.sh" target="_blank">https://dl.233.mba/sh/superbenchpro.sh</a>)


三、路由跟踪
1.besttrace4linux
besttrace4linux是用于检测回程路由的软件,可以直观的显示路由追踪的各级节点。

使用方法:

wget <a href="https://cdn.ipip.net/17mon/besttrace4linux.zip" target="_blank">https://cdn.ipip.net/17mon/besttrace4linux.zip</a>
unzip besttrace4linux.zip
chmod +x besttrace
./besttrace -q 1 IP

测试电信回程:./besttrace -q 1 gd.189.cn
测试联通回程:./besttrace -q 1 www.cd10010.cn
测试移动回程:./besttrace -q 1 bj.10086.cn

2.柠檬脚本可以直接测试路由,以下脚本可以直接测试三网路由,每个网络有三个节点

wget -qO- git.io/fphX1 | bashwget -qO- git.io/besttrace | bash

3.丢包率测试
测试全球节点的丢包率

工具地址:http://ping.pe

如果我们的用户是面向国内的,那么就主要关注下国内节点的丢包情况(China开头),其中Loss一列就是你的VPS在这个节点的丢包率,我们在最后一列Chart中也可以非常直观的看出丢包情况,红色就是丢包,绿色就是网络情况非常好。

4.ZBench
ZBench 将bench.sh和SuperBench.sh这两个脚本结合在一起,然后加入 Ping 以及 路由测试 功能。

中文版使用方法:

wget -N --no-check-certificate <a href="https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh" target="_blank">https://raw.githubusercontent.co ... master/ZBench-CN.sh</a> && bash ZBench-CN.sh

英文版使用方法:

wget -N --no-check-certificate <a href="https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh" target="_blank">https://raw.githubusercontent.co ... ch/master/ZBench.sh</a> && bash ZBench.sh

5、backtrace
一键回程测试脚本:backtrace,三网回程路由测试,配合BestTrace脚本使用更好,因为backtrace是直接告诉你回程路由的线路类型,而BestTrace是把回程路由具体信息展示给你看。这两者配合使用的话可以更好更方便的综合判断路由情况。

curl <a href="https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh" target="_blank">https://raw.githubusercontent.co ... ace/main/install.sh</a> -sSf | sh

6.去程路由
很多在线站长工具都有提供去程路由追踪,例如卡卡网、站长工具、爱站等等。

四、流媒体检测脚本
1.检测VPS是否能解锁奈飞
脚本一
主下载链接:

wget -O nf <a href="https://github.com/sjlleo/netflix-verify/releases/download/2.01/nf_2.01_linux_amd64" target="_blank">https://github.com/sjlleo/netfli ... nf_2.01_linux_amd64</a> && chmod +x nf && clear && ./nf

备用下载链接(支持IPV6):

wget -O nf <a href="https://cdn.jsdelivr.net/gh/sjlleo/netflix-verify/CDNRelease/nf_2.01_linux_amd64" target="_blank">https://cdn.jsdelivr.net/gh/sjll ... nf_2.01_linux_amd64</a> && chmod +x nf && clear && ./nf

脚本二
感谢CoiaPrant大佬提供的脚本。github:CoiaPrant/Netflix_Unlock_Information

自己先安装Curl

检测命令:

bash <(curl -sSL "https://github.com/CoiaPrant/Netflix_Unlock_Information/raw/main/netflix.sh")

备用命令:

bash <(curl -sSL "https://www.zeroteam.top/files/netflix.sh")


2.流媒体综合检测脚本

bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh")

主要测试IP能否解锁以下流媒体网站:
Netflix | YouTube Region | DisneyPlus | Steam Currency | HBO Now | BBC | MyTVSuper | Now E | Viu TV | Bahamut Anime | BiliBili China Mainland Only | BiliBili Hongkong/Macau/Taiwan | Bilibili Taiwan Only | Abema.TV | Paravi | U Next | Hulu Japan | Princess Connect Re:Dive Japan | Pretty Derby Japan | Kancolle Japan | Dazn

流媒体测试代码合集二

bash <(curl -L -s <a href="https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh" target="_blank">https://raw.githubusercontent.co ... Check/main/check.sh</a>)

3.TikTok检测脚本(需centos8以上)

bash <(curl -s <a href="https://raw.githubusercontent.com/lmc999/TikTokCheck/main/tiktok.sh" target="_blank">https://raw.githubusercontent.co ... heck/main/tiktok.sh</a>)

五、其他测试命令/脚本
1.查看CPU信息
cat /proc/cpuinfo

2.内存检测脚本
CentOS系统

yum install wget -y
yum groupinstall "Development Tools" -y
wget <a href="https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp" target="_blank">https://raw.githubusercontent.co ... aster/memtester.cpp</a>
gcc -l stdc++ memtester.cpp
./a.out

Ubuntu / Debian系统

apt-get update
apt-get install wget build-essential -y
wget <a href="https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp" target="_blank">https://raw.githubusercontent.co ... aster/memtester.cpp</a>gcc -l stdc++ memtester.cpp
./a.out

六、一键安装那啥脚本
http://d.locbb.com/shell/shadowsocks-all.sh
测评工具结束。

七、Linux系统TCP BBR加速一键安装管理脚本
此脚本可以一键快速安装BBR原版内核(5.4.13/5.4.14/5.5.0)、BBRplus版内核(4.14.168)、多种Lotserver(锐速)内核、xanmod版内核(5.5.1)、BBR2测试版内核(5.4.0)、Zen版内核(5.5.2)。加速方案也有多种选择:BBR+FQ加速、BBR+CAKE加速 、BBRplus+FQ版加速、Lotserver(锐速)加速、BBR2+FQ加速、BBR2+CAKE加速、BBR2+FQ+ECN加速、BBR2+CAKE+ECN加速,加速模式挺全面的,有兴趣的可以在自己服务器上试一试。

脚本支持系统:CentOS 6/7/8,Debian 8/9/10,ubuntu 16/18/19
支持一键安装脚本:BBR+BBRplus+Lotserver
脚本作者:千影,cx9208,YLX
不卸载内核版本

wget -O tcpx.sh "https://git.io/JYxKU" && chmod +x tcpx.sh && ./tcpx.sh

卸载内核版本

wget -O tcp.sh "https://git.io/coolspeeda" && chmod +x tcp.sh && ./tcp.sh