Network testing tool - iperf2 Android APK download and simple use


Preface

There is an Android car device in the project that loads LAN images very slowly, so it is necessary to test the bandwidth of an Android car device. After research, iperf2 was used.


1. What is iperf2?

iperf2 is an open source network performance testing tool used to measure TCP and UDP bandwidth quality. It supports measuring maximum TCP bandwidth and has a variety of parameters and UDP features. iperf2 can report bandwidth, latency jitter and packet loss.

2. Usage steps

Download apk, I downloaded it from Dandelion

Download link

Insert image description here

Then install it directly on the Android device to be tested as a server for testing bandwidth. You also need to install one on other Android devices to receive data as a client. The interface after downloading is probably like this

Then we enter iperf -s on the Android device that needs to be tested, and click start to start the server
Insert image description here

  • More commands can be viewed in help

After normal startup, you can see the following information
Insert image description here

Then enter the following command on the client, also start
Insert image description here


At this time, you can see the bandwidth of the device that needs to be tested. For example, the first line means "a total of 3.25mbytes was transmitted from 4 seconds to five seconds." It can be known that in this 1 second, the data transmission volume is 3.25 MB. In order to convert this to bits per second, we need to convert MB (megabytes) to bits.

1 M B (megabytes) = 8 M b (megabits) = 8 × 1 0 6 bits (bits) 1MB (megabytes) = 8Mb (megabits) = 8 × 10^6 bits (bits)1MB(Trillion character)=8Mb(trillion ratio)=8×106bits(Special) 3.25 × 8 × 1 0 6 b i t s = 25.6 × 1 0 6 b i t s 3.25 × 8 × 10^6 bits = 25.6 × 10^6 bits
因此,传输的数量为:
3.25×8×106bits=25.6×106bits

First, we need to understand the basic unit of data transmission. In the computer field, the basic unit of data transmission is bit, and computers usually process data at the byte level. 1 byte is equal to 8 bits.

In this sentence, "mbytes" means megabytes and "mbits" means megabits. So, 3.25 Mbytes equals 3.25 x 8 = 26 Mbits.

The transmission rate refers to the amount of data transmitted per unit time, that is, the amount of data transmitted per second. So, 27.3 Mbits/s means that 27.3 Mbits of data are transferred every second.

Therefore, from 4 seconds to 5 seconds, a total of 26 Mbits of data are transmitted, and the transmission rate is 27.3 Mbits/s. What this means is that during this time, data was transferred at a rate of just over 27.3 Mbits per second.

Attached is the translation of the screenshot of the command in help

Insert image description here


Summarize

This article introduces a network performance testing tool-iperf2, which can be used on Android devices by downloading the APK. The usage steps include using one device as a server and another device as a client to receive data, starting the test through commands and viewing the test results. The tool measures TCP and UDP bandwidth quality and reports information such as bandwidth, latency jitter, and packet loss.

Guess you like

Origin blog.csdn.net/shop_and_sleep/article/details/134267618