1.安装speedtest
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py --no-check-certificate
chmod +x speedtest-cli
2.选择国家,例,从本地到新加坡
[root@122.10.248.111 ~]$ ./speedtest-cli --list|grep "Singapore"
14364) PT. Aplikanusa Lintasarta (Singapore, Singapore) [2.73 km]
367) NewMedia Express (Singapore, Republic of Singapore) [7.42 km]
13623) Singtel (Singapore, Singapore) [7.42 km]
2054) Viewqwest Pte Ltd (Singapore, Republic of Singapore) [7.42 km]
4235) StarHub Mobile Pte Ltd (Singapore, Singapore) [7.42 km]
5935) MyRepublic (Singapore, Republic of Singapore) [7.42 km]
7311) M1 Limited (Singapore, Republic of Singapore) [7.42 km]
7556) PT FirstMedia (Singapore, Republic of Singapore) [7.42 km]
20637) OVH Cloud (Singapore, Singapore) [7.42 km]
5168) PT Indosat Tbk (Singapore, Republic of Singapore) [7.42 km]
28921) PhoenixNAP Global IT Services (Singapore, Singapore) [7.42 km]
9575) OffsiteDataSync (Singapore, Republic of Singapore) [7.42 km]
7368) PT Mora Telematika Indonesia (Singapore, Republic of Singapore) [7.42 km]
31795) Solone Pte Ltd (Singapore, Singapore) [7.42 km]
31293) Pacific Internet (S) (Singapore, Singapore) [7.42 km]
#压测:
#./speedtest-cli --server 14364 --share
[root@122.10.248.111 ~]$ ./speedtest-cli --server 367 --share
Retrieving speedtest.net configuration…
Testing from Zenlayer (122.10.248.40)…
Retrieving speedtest.net server list…
Retrieving information for the selected server…
Hosted by NewMedia Express (Singapore) [7.42 km]: 59.932 ms
Testing download speed……………………………………………………………………..
Download: 310.83 Mbit/s
Testing upload speed……………………………………………………………………………………
Upload: 240.79 Mbit/s
Share results: http://www.speedtest.net/result/9247235526.png
3.使用iperf3进行带宽压测
#安装iperf3
yum -y install gcc make
cd /tmp
wget https://iperf.fr/download/source/iperf-3.1.3-source.tar.gz
tar zxvf iperf-3.1.3-source.tar.gz
cd iperf-3.1.3
./configure
make
make install
#安装后的绝对路径
# /usr/local/bin/iperf3