CentOS下测试服务器网速的三种方法
时间:2016年10月09日 | 作者:系统管理员 | 分类:linux/unix系列 | 浏览:8623 °C
以下测试脚本运行在本站的韩国服务器上,如有疑问均可提出。
一、centos使用bench.sh 脚本测试速度 【推荐】
[root@localhost ~]# wget -qO- 86.re/bench.sh | bash
---------------------------------------------------------------------- CPU model : Intel(R) tooserver.net(R) CPU E3-1230 V2 @ 3.30GHz Number of cores : 8 CPU frequency : 1600.000 MHz Total amount of ram : 15164 MB Total amount of swap : 7647 MB System uptime : 0days, 1:1:24 Load average : 0.05, 0.04, 0.01 OS : CentOS 6.5 Arch : x86_64 (64 Bit) Kernel : 2.6.32-431.el6.x86_64 ---------------------------------------------------------------------- Node Name IPv4 address Download Speed CacheFly 205.234.175.175 6.49MB/s Linode, Tokyo, JP 106.187.96.148 2.15MB/s Linode, Singapore, SG 139.162.23.4 1.68MB/s Linode, London, UK 176.58.107.39 1.51MB/s Linode, Frankfurt, DE 139.162.130.8 1.54MB/s Linode, Fremont, CA 50.116.14.9 3.18MB/s Softlayer, Dallas, TX 173.192.68.18 2.71MB/s Softlayer, Seattle, WA 67.228.112.250 2.89MB/s Softlayer, Frankfurt, DE 159.122.69.4 1.45MB/s Softlayer, Singapore, SG 119.81.28.170 3.74MB/s Softlayer, HongKong, CN 119.81.130.170 3.62MB/s ---------------------------------------------------------------------- I/O speed(1st run) : 182 MB/s I/O speed(2nd run) : 184 MB/s I/O speed(3rd run) : 181 MB/s Average I/O speed : 182.333 MB/s
二、使用bench.sh 脚本测试速度
[root@localhost ~]# wget freevps.us/downloads/bench.sh -O - -o /dev/null|bash
[root@localhost ~]# wget freevps.us/downloads/bench.sh -O - -o /dev/null|bash Benchmark started on Sun Oct 9 15:21:07 HKT 2016 Full benchmark log: /root/bench.log System Info ----------- Processor : Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz CPU Cores : 8Frequency : 1600.000 MHz Memory : 15164 MBSwap : 7647 MB Uptime : 1:20, OS : CentOS release 6.5 (Final) Arch : x86_64 (64 Bit) Kernel : 2.6.32-431.el6.x86_64 Hostname : tooserver.net.localdomain Speedtest (IPv4 only) --------------------- Your public IPv4 is 103.65.181.124 Location Provider Speed CDN Cachefly 4.42MB/s Atlanta, GA, US Coloat 748KB/s Dallas, TX, US Softlayer 4.15MB/s Seattle, WA, US Softlayer 2.60MB/s San Jose, CA, US Softlayer 3.82MB/s Washington, DC, US Softlayer 2.82MB/s Tokyo, Japan Linode 1.90MB/s Singapore Softlayer 2.68MB/s Rotterdam, Netherlands id3.net 614KB/s Haarlem, Netherlands Leaseweb 1.22MB/s Disk Speed----------I/O (1st run) : 182 MB/s I/O (2nd run) : 178 MB/sI/O (3rd run) : 180 MB/s Average I/O : 180 MB/s [root@localhost ~]#
三
、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
Retrieving speedtest.net configuration... Retrieving tooserver.net server list... Testing from KT (103.65.181.124)... Selecting best server based on latency... Hosted by China Broadband Communications (Hong Kong) [11.64 km]: 95.107 ms Testing download speed........................................ Download: 6.29 Mbit/s Testing upload speed.................................................. Upload: 14.04 Mbit/s
当然对于测试结果,一般在实际应用中不一定能达到这个值,仅作为参考使用。