LinuxLinux
centos系統(tǒng)下怎么測試網(wǎng)速/帶寬
以下測試腳本運(yùn)行在本站的湖北服務(wù)器上,如有疑問均可提出。
一、centos使用bench.sh 腳本測試速度 【推薦】
[root@localhost ~]# wget -qO- 86.re/bench.sh | bash
CPU Model : Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz
CPU Cores : 4 @ 2700.000 MHz
CPU Cache : 30720 KB
AES-NI : Enabled
VM-x/AMD-V : Enabled
Total Disk : 30.0 GB (1.6 GB Used)
Total Mem : 3.6 GB (142.5 MB Used)
System uptime : 0 days, 0 hour 8 min
Load average : 0.10, 0.30, 0.24
OS : CentOS Stream release 8
Arch : x86_64 (64 Bit)
Kernel : 4.18.0-358.el8.x86_64
TCP CC : cubic
Virtualization : KVM
Organization : AS4134 CHINANET-BACKBONE
Location : Wuhan / CN
Region : Hubei
----------------------------------------------------------------------
I/O Speed(1st run) : 252 MB/s
I/O Speed(2nd run) : 566 MB/s
I/O Speed(3rd run) : 538 MB/s
I/O Speed(average) : 452.0 MB/s
----------------------------------------------------------------------
Node Name Upload Speed Download Speed Latency
Speedtest.net 476.68 Mbps 423.23 Mbps 7.58 ms
Los Angeles, US 146.96 Mbps 381.21 Mbps 179.74 ms
Dallas, US 161.91 Mbps 392.17 Mbps 238.46 ms
Montreal, CA 23.54 Mbps 442.57 Mbps 247.79 ms
Paris, FR 68.23 Mbps 303.39 Mbps 252.21 ms
Amsterdam, NL 48.30 Mbps 286.75 Mbps 278.35 ms
Shanghai, CN 374.08 Mbps 395.98 Mbps 26.42 ms
Nanjing, CN 477.38 Mbps 466.46 Mbps 16.64 ms
Hongkong, CN 4.06 Mbps 3.47 Mbps 43.59 ms
Seoul, KR 410.51 Mbps 416.56 Mbps 45.84 ms
Singapore, SG 139.73 Mbps 209.96 Mbps 339.96 ms
----------------------------------------------------------------------
執(zhí)行wget -qO- bench.sh | bash
命令后,可以查詢到云服務(wù)器CPU Model(CPU型號)、CPU Cores(核數(shù))、CPU Frequency(主頻)、Total Disk(磁盤容量)、Total Mem(內(nèi)存)、Swap(虛擬內(nèi)存)、系統(tǒng)發(fā)行版本、Linux內(nèi)核、地域節(jié)點(diǎn)、磁盤I/O讀寫速度及云服務(wù)器上傳下載速度測試。
二、
centos安裝speedtest-cli 測試速度
[root@localhost ~]# wget --no-check-certificate https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
[root@localhost ~]# chmod a+rx speedtest_cli.py
[root@localhost ~]# ./speedtest_cli.py
當(dāng)然對于測試結(jié)果,一般在實(shí)際應(yīng)用中不一定能達(dá)到這個值,僅作為參考使用。