Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the test method of network port bandwidth of embedded linux equipment?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What is the test method of the network port bandwidth of embedded linux equipment? I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Iperf is a network performance testing tool based on Client/Server, which can test the bandwidth quality of TCP, UDP and SCTP. It can provide network throughput information, as well as statistical information such as vibration, packet loss rate, maximum segment and maximum transmission unit size, which helps us to test network performance and locate network bottlenecks. The jitter and packet loss rate are suitable for UDP test, and the second bandwidth test is suitable for TCP and UDP.

I. introduction

Iperf is a network performance testing tool based on Client/Server, which can test the bandwidth quality of TCP, UDP and SCTP. It can provide network throughput information, as well as statistical information such as vibration, packet loss rate, maximum segment and maximum transmission unit size, which helps us to test network performance and locate network bottlenecks. The jitter and packet loss rate are suitable for UDP test, and the second bandwidth test is suitable for TCP and UDP.

Iperf can be said to be a sharp weapon for network interface testing in embedded devices. The network interface here can be not only a general Ethernet, but also a wireless network, or a 4G module.

Official public network server: iperf-servers. However, after testing the speed, it's a bit of a chicken catch, so it's cool to build your own test.

II. Cross compilation

Step1. download

Download address: http://downloads.es.net/pub/iperf/. This article takes the iperf-3.0.1.tar.gz version as an example.

Step2. Configure. / configure-- host=arm- linux-- prefix=$PWD/xxx_install

Among them

-- host: specify cross-compilation tools, such as arm-none-linux-gnueabi, arm-linux-gnueabihf, arm-linux, etc., which correspond to the cross-compilation tools used on the target board. -- prefix: specify the installation directory, and all the compiled files will be placed in the installation directory.

Step3. Compile and install make make install

When you are finished, the files will be automatically installed to the install directory specified above.

Step4. Remove debugging information and compress

After all, the resources on embedded devices are expensive; using the cross-compilation tool strip to remove the debugging information of the image, the program size can generally be reduced by about 50% without affecting the use of the program. In this procedure, we only use 2 files, iperf3 under bin and libiperf.so.0.0.0 under lib.

$cd xxx_install # enter the installation directory $arm-linux-gnueabi-strip bin/iperf3 # remove iperf3 image debugging information $arm-linux-gnueabi-strip lib/libiperf.so.0.0.0 # remove shared library debugging information $rm lib/libiperf.a lib/libiperf.la # delete two unused library files $tar cvf iperf-exec-3.0.1.tar.gz bin lib # compress the bin and lib directories

Third, bandwidth test Step1. Start the server iperf

On Ubuntu, start as a server:

$iperf3-s-I 1

Parameter description:

-s: start in server mode-I: display the report interval in seconds-w: specify the TCP window size, default is 8KB Step2. Start the client $iperf3-c 192.168.1.100 (can also be a public network IP)-I 1-w 448k-t 10

Parameter description:

-c: start in client mode, followed by the IP address of the server-t: test time. Default 10 second LOG recording server: iperf3-s > > iperfs.log 2 > & 1 & client: iperf3-c 192.168.1.100-I 1-w 448k-t 10 > > iperfc.log 2 > & 1 & IV, iperf parameters

Official use document: https://iperf.fr/iperf-doc.php

You can also use iperf3-h to view it after installation.

After reading the above, have you mastered the method of testing the network port bandwidth of embedded linux devices? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report