代码之家  ›  专栏  ›  技术社区  ›  ilya

从iperf2输出中提取上传和下载带宽

  •  0
  • ilya  · 技术社区  · 7 年前

    我用iperf2。iperf2已在STM32板上设置为服务器模式。客户端模式在Windows PC上使用。 我想接收上传和下载条款中的传输带宽统计信息。

    iperf -c 192.168.21.25 -d -t 5 -f m:
    
    [220] local 192.168.21.1 port 60602 connected with 192.168.21.25 port 5001
    
    [252] local 192.168.21.1 port 5001 connected with 192.168.21.25 port 49155
    
    [ ID] Interval       Transfer     Bandwidth
    
    [252]  0.0- 5.0 sec  48.5 MBytes  81.3 Mbits/sec
    
    [220]  0.0- 5.0 sec  23.1 MBytes  38.7 Mbits/sec
    

    =========

    iperf -c 192.168.21.25 -r -t 5 -f m
    
    [216] local 192.168.21.1 port 60531 connected with 192.168.21.25 port 5001
    
    [ ID] Interval       Transfer     Bandwidth
    
    [216]  0.0- 5.0 sec  33.9 MBytes  56.8 Mbits/sec
    
    [212] local 192.168.21.1 port 5001 connected with 192.168.21.25 port 49154
    
    [212]  0.0- 5.0 sec  54.9 MBytes  92.1 Mbits/sec
    

    在这些响应中检测上传和下载带宽的规则是什么?

    1 回复  |  直到 7 年前
        1
  •  1
  •   Marcello B.    7 年前

    [] local port <port> 提供客户端端口,而与的连接提供服务器端口。

    所以在例1中, [220] 是从客户端到服务器的通信量,[252]是从服务器到客户端的通信量。

    推荐文章