iperf‌ 网络性能测试工具

背景介绍:
在进行新平台的选用时,我们需要评估平台的网络传输性能,如连接稳定性,数据传输速率等。 iperf‌ 是一款广泛使用的网络性能测试工具,主要用于测量 TCP 和 UDP 带宽、延迟、抖动和数据包丢失。

iperf使用:(以iperf3 版本为例)

  1. windows/linux 侧直接安装服务端即可
    (1)windows 端直接下载可执行文件,放置到系统目录即可
    下载官网:https://iperf.fr/iperf-download.php
    (2)Linux 端 sudo apt-get install iperf3

  2. arm-linux 平台
    (1)官网下载对应版本源码:https://downloads.es.net/pub/iperf/
    (2)设置交叉编译环境变量
    (3)解压缩源码,执行配置

点击查看代码
./configure \
    --host=aarch64-poky-linux \
    --prefix=/tmp/iperf3_arm_install \
    CC=aarch64-poky-linux-gcc \
    CFLAGS="-mcpu=cortex-a53+crc+crypto -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security" \
    LDFLAGS="--sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux" \
    CPPFLAGS="--sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux"
(4)make , make install

(5)将/tmp/iperf3_arm_install 目录下编译生成的
libiperf.so.0.0.0 复制到 arm-Linux 的 /lib 目录
iperf3 复制到 arm-Linux 的 /usr/bin/ 目录

3.测试过程
(1)windows 侧,cmd 输入命令: iperf3 -s
(2)arm-linux 侧,终端执行指令: /usr/bin/iperf3 -c 192.168.2.151 -t 10 -P 4
(3)测试结果:
企业微信截图_17871103372144

posted @ 2026-08-19 11:33  北洋水师  阅读(27)  评论(0)    收藏  举报
window.addEventListener('load', function() { if (window.hljs && window.hljs.lineNumbersBlock) { document.querySelectorAll('pre code').forEach((block) => { hljs.lineNumbersBlock(block); }); } });