文档首页> Linux> centos系统下怎么测试网速/带宽

centos系统下怎么测试网速/带宽

发布时间:2025-09-10 01:59       

以下测试脚本运行在本站的湖北服务器上,如有疑问均可提出。

 

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

 

----------------------------------------------------------------------

 

执行wget -qO- bench.sh | bash命令后,可以查询到云服务器CPU Model(CPU型号)、CPU Cores(核数)、CPU Frequency(主频)、Total Disk(磁盘容量)、Total Mem(内存)、Swap(虚拟内存)、系统发行版本、Linux内核、地域节点、磁盘I/O读写速度及云服务器上传下载速度测试。

 

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

 

当然对于测试结果,一般在实际应用中不一定能达到这个值,仅作为参考使用。