vps 常用测试脚本

vps 常用测试脚本

背景与核心痛点:在购买海外 VPS 或进行服务器开机验收时,全面测试硬件性能(CPU 跑分、内存与磁盘 IO)、三网回程网络路由、流媒体与 AI 解锁状态是避坑奸商超售的关键步骤。本文精选汇总 Linux 领域最权威、最常用的开源体检工具(如 YABS、融合怪 ECS、LemonBench、三网回程 MTR、BBR 加速与流媒体解锁),一键式掌握 VPS 全面性能体检与调优实操。

目录

全能综合性能体检:YABS 与融合怪

1. YABS 性能测试(Geekbench + fio 磁盘 + 带宽)

国外最主流的综合基准测试脚本:

curl -sL yabs.sh | bash
# 若剔除国外网络带宽测速(避免浪费流量):
curl -sL yabs.sh | bash -s -- -i

2. 融合怪 ECS 综合测评(国内首选)

全面检测硬件、三网延迟、流媒体解锁及回程路由:

bash <(wget -qO- bash.spiritlhl.net/ecs)

3. LemonBench 快速体检

wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast

三网回程路由与网络延迟测试

检测电信 163/CN2、联通 4837/9929、移动 CMIN2 等真实回程线路:

# 三网回程路由 MTR
curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh | bash

# BestTrace 多地区详细路由跟踪
wget -qO- git.io/besttrace | bash

流媒体与 AI 服务解锁检测

1. 原生流媒体解锁检测(Netflix / Disney+ / YouTube)

bash <(curl -L -s check.unlock.media)
# 或使用专业地区限制检查脚本
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)

2. OpenAI / ChatGPT 解锁检测

bash <(curl -Ls https://cdn.jsdelivr.net/gh/missuo/OpenAI-Checker/openai.sh)

内核 BBR 加速与 Swap 虚拟内存优化

1. 开启 Linux 原生 BBR 拥塞控制

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
# 验证开启状态:返回包含 tcp_bbr 即代表已生效
lsmod | grep bbr

2. Swap 虚拟内存一键添加

针对 512MB 内存的小型 VPS 添加虚拟内存避免 OOM:

wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh

CPU 与底层硬件基准跑分

  • UnixBench 性能测试:
    wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh
    chmod +x unixbench.sh && ./unixbench.sh
    
  • PassMark PerformanceTest:
    curl -O https://www.passmark.com/downloads/pt_linux_x64.zip
    unzip pt_linux_x64.zip && ./pt_linux_x64
    

独立服务器硬盘通电与甲骨文保活

  • 独立服务器硬盘通电时间与通电次数检测:
    wget https://github.com/Aniverse/A/raw/i/a && bash a
    
  • 甲骨文云(Oracle Cloud)防闲置自动保活:
    bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh)