我们时常会有测试网络速度的需求,最常用的就是测试宽带的下载速度,比如网页使用测速网测试出当前带宽的下载速度和上传速度。 同样的方法,我们也可以在手机上测试带宽速度。
我们时常会有测试网络速度的需求,最常用的就是测试宽带的下载速度,比如网页使用"测速网"测试出当前带宽的下载速度和上传速度。

同样的方法,我们也可以在手机上测试带宽速度。

但此种网络测速方法只能测试宽带速度,如果想使用手机测试局域网或是互联网之间不同服务器之前的传输速度时,这种操作方式就力不从心了。最近恰好在项目上,要求只能使用手机/手持机接入网络测试,于是研究了一下。
经过测试,使用下面这款软件可以轻松实现(搜索『运维贼船』,回复关键字1023获取),适用于安卓系统。如果是苹果手机,请在appstore里搜索he.net获得。

获取到安卓软件包后,将软件解压并安装,仅用安装he.net这款软件即可,另一款是wifi分析工具,根据需求安装。

测试需要使用两台手机,或者使用手机+笔记本的形式,我这里演示前者。将he.net(Network Tools)分别安装在两台手机上,安装完成后打开。指定其中一台为服务端,另一台为客户端。
在服务端上展开左上角的菜单,点击"Interface Information"。

记录下IP地址,比如我的IP地址是192.168.1.100

然后再次点击左上角菜单,找到iperf3

输入"-s",然后键盘确认。

在客户端上使用同样的方法进入到iperf3里,输入"-c 服务端ip地址",比如"-c 192.168.1.100",键盘确认,这样就可以看到我们的传输速率(Bandwidth)了。除此之后,也可以通过与电脑上的iperf3搭配测试网络速度,感兴趣的朋友可以自行尝试一下。
