关于Linux系统服务器性能、带宽测试的脚本蜗牛分享过很多,主要是为了方便大家对自己购买的服务器能简单直观的做一个性能或带宽的测试,蜗牛常用的测试脚本有一下这些:
1、Superspeed一键测速脚本 测试服务器到中国电信/联通/移动速度
2、Linux服务器性能测试一键包 一键性能/线路/速度/Ping/跑分检测
今天在这里蜗牛为大家分享一个回程Ping一键测试脚本,脚本是出自@小Z博客,可以一键测试你的服务器到国内电信、联通、移动线路的回程Ping。
一、测试命令
使用Putty、宝塔远程桌面助手、Xshell等工具通过SSH端口连接自己服务器,然后执行下面命令进行测试:
wget https://raw.githubusercontent.com/wn789/Mping/master/mping.sh bash mping.sh
二、测试结果展示
以下是蜗牛使用的阿里云云服务器测试结果。
[root@iZwz981ir3uk69okkbcayiZ ~]# https://raw.githubusercontent.com/wn789/Mping/master/mping.sh --2017-12-19 13:27:14-- https://raw.githubusercontent.com/wn789/Mping/master/mping.sh Resolving raw.githubusercontent.com... 151.101.228.133 Connecting to raw.githubusercontent.com|151.101.228.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1108 (1.1K) [text/plain] Saving to: “mping.sh” 100%[=======================================================================================================================================================================>] 1,108 --.-K/s in 0s 2017-12-19 13:27:15 (86.1 MB/s) - “mping.sh” saved [1108/1108] [root@iZwz981ir3uk69okkbcayiZ ~]# bash mping.sh 测试中... ------------------------------------------- 【四川 电信】 - 125.64.38.178 20 packets transmitted, 20 received, 0% packet loss, time 19066ms rtt min/avg/max/mdev = 41.089/41.289/41.583/0.178 ms ------------------------------------------- 【北京 电信】 - 106.120.243.142 20 packets transmitted, 20 received, +12 duplicates, 0% packet loss, time 19060ms rtt min/avg/max/mdev = 36.058/36.204/36.956/0.287 ms ------------------------------------------- 【北京 联通】 - 103.254.70.52 20 packets transmitted, 18 received, 10% packet loss, time 20024ms rtt min/avg/max/mdev = 99.430/110.132/118.269/6.347 ms ------------------------------------------- 【北京 移动】 - 218.205.152.14 20 packets transmitted, 20 received, 0% packet loss, time 19074ms rtt min/avg/max/mdev = 41.518/41.650/41.888/0.153 ms ------------------------------------------- 【上海 移动】 - 117.131.14.202 20 packets transmitted, 20 received, 0% packet loss, time 19062ms rtt min/avg/max/mdev = 30.499/30.658/32.858/0.555 ms ------------------------------------------- 【上海 电信】 - 211.144.205.58 20 packets transmitted, 6 received, 70% packet loss, time 20005ms rtt min/avg/max/mdev = 34.010/34.132/34.508/0.272 ms ------------------------------------------- 【上海 联通】 - 220.196.42.133 20 packets transmitted, 20 received, 0% packet loss, time 19055ms rtt min/avg/max/mdev = 31.956/32.100/32.252/0.077 ms ------------------------------------------- 【广东 电信】 - 121.11.69.135 20 packets transmitted, 20 received, 0% packet loss, time 19034ms rtt min/avg/max/mdev = 13.168/13.511/15.087/0.389 ms ------------------------------------------- 【广东 联通】 - 27.40.0.30 20 packets transmitted, 20 received, 0% packet loss, time 19040ms rtt min/avg/max/mdev = 7.622/7.720/7.846/0.125 ms ------------------------------------------- 【广东 移动】 - 211.139.129.222 20 packets transmitted, 20 received, 0% packet loss, time 19037ms rtt min/avg/max/mdev = 4.742/4.771/4.878/0.075 ms ------------------------------------------- min:最低延迟 avg:平均延迟 max:最高延迟 mdev:平均偏差 -------------------------------------------