【问题标题】:iperf3 results in packets per second?iperf3 每秒产生数据包?
【发布时间】:2016-10-25 14:48:08
【问题描述】:

iperf3 能否在生成 UDP 流量时也以每秒数据包的形式报告测量值?

详细模式的典型输出如下:

Test Complete. Summary Results:
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  4]   0.00-10.00  sec  1.64 GBytes  1.41 Gbits/sec  0.010 ms  804029/1208925 (67%)  
[  4] Sent 1208925 datagrams
CPU Utilization: local/sender 99.6% (16.4%u/83.3%s), remote/receiver 0.1% (0.0%u/0.1%s)

iperf Done.

我看到在iperf2 中可以指定pps 中的输入速率,但没有提及测量的接收速率(我在iperf3 中没有看到此功能)

【问题讨论】:

  • 那么,这就是您要找的吗?

标签: udp bandwidth iperf iperf3


【解决方案1】:

我在 iperf3 中没有看到 pps 选项,但是下面的链接详细说明了获取所需内容的方法。

https://discuss.aerospike.com/t/benchmarking-throughput-and-packet-count-with-iperf3/2791

像往常一样运行 iperf3 测试。在服务器上创建一个包含以下内容的脚本:

#!/bin/bash

INTERVAL="1"  # update interval in seconds

if [ -z "$1" ]; then
        echo
        echo usage: $0 [network-interface]
        echo
        echo e.g. $0 eth0
        echo
        echo shows packets-per-second
        exit
fi

IF=$1

while true
do
        R1=`cat /sys/class/net/$1/statistics/rx_packets`
        T1=`cat /sys/class/net/$1/statistics/tx_packets`
        sleep $INTERVAL
        R2=`cat /sys/class/net/$1/statistics/rx_packets`
        T2=`cat /sys/class/net/$1/statistics/tx_packets`
        TXPPS=`expr $T2 - $T1`
        RXPPS=`expr $R2 - $R1`
        echo "TX $1: $TXPPS pkts/s RX $1: $RXPPS pkts/s"
 done

这将为您提供每秒数据包的输出。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多