Linux测试脚本

发布于 2021-03-30  117 次阅读


以Debian 10 Buster为例

更新镜像源

nano /etc/apt/sources.list
# deb http://ftp.us.debian.org/debian buster main

deb http://ftp.us.debian.org/debian buster main
deb-src http://ftp.us.debian.org/debian buster main

deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main

# buster-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian buster-updates main
deb-src http://ftp.us.debian.org/debian buster-updates main

不同地区请自行替换对应链接

Debian 全球镜像站

Debian 10 Buster 国内常用镜像源 - 云+社区 - 腾讯云 (tencent.com)

apt-get update
apt-get upgrade

测试脚本合集

wget git.io/vpstest && bash vpstest

全网测速脚本

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

测试服务器基本参数

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

源自:

SuperBench.sh 一键测试服务器的基本参数 - Linux - 老鬼的博客(OldKing.net)

GitHub - oooldking/script: Some Linux scripts

#国内测速虚高:
wget -qO- git.io/superbench.sh | bash
#或
curl -Lso- git.io/superbench.sh | bash    
#或
wget -qO- sb.oldking.net | bash

GitHub - LemonBench/LemonBench: A simple Linux Benchmark Toolkit

#快速测试:
apt-get install -y wget
wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/master/LemonBench.sh | bash -s fast

#完整测试:

wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/master/LemonBench.sh | bash -s full

测试流媒体解锁

源自:

GitHub - CoiaPrant/MediaUnlock_Test: 流媒体解锁检测

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

GitHub - sjlleo/netflix-verify: 流媒体NetFlix解锁检测脚本 / A script used to determine whether your network can watch native Netflix movies or not

#适用于IPv4网络的机器
wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.6/nf_2.6_linux_amd64 && chmod +x nf && clear && ./nf

#通用选项,既适用于有IPv4网络的机器也适用于仅有IPv6网络的机器
wget -O nf https://cdn.jsdelivr.net/gh/sjlleo/netflix-verify/CDNRelease/nf_2.60_linux_amd64 && chmod +x nf && clear && ./nf

GitHub - sjlleo/TubeCheck: 一个用于检测/诊断Youtube地域信息的脚本

#支持IPv4网络的机器:

wget -O tubecheck https://github.com/sjlleo/TubeCheck/releases/download/1.0Beta/tubecheck_1.0beta_linux_amd64 && chmod +x tubecheck && clear && ./tubecheck

#支持IPv4或者IPv6网络的机器(通用选项):

wget -O tubecheck https://cdn.jsdelivr.net/gh/sjlleo/TubeCheck/CDN/tubecheck_1.0beta_linux_amd64 && chmod +x tubecheck && clear && ./tubecheck

测回程

curl https://raw.githubusercontent.com/cleverzzw/mtr_trace/main/mtr_trace.sh|bash

WorstTrace

WorstTrace 是一个简单的带有 Geo IP 功能的原生 Traceroute 工具

cd /usr/bin

wget https://pkg.wtrace.app/linux/worsttrace
chmod a+x worsttrace

worsttrace <Target IP>

Besttrace

ipip.net旗下带IP归属地的trace工具Linux(X86/ARM)/Mac/BSD。

Linux版本的下载地址:https://cdn.ipip.net/17mon/besttrace4linux.zip

一般用其中的besttrace即可。

备份:

将压缩包中的besttrace文件上传至/usr/bin

cd /usr/bin
chmod 777 besttrace

besttrace -h

iperf3

apt-get install -y iperf3

iperf3 -s

iperf3 -c xx.xx.xx.xx -i 1 -t 60

Love is merely a madness.