linux 下 iperf 对 UDP 丢包率测试

linux丢包率测试

服务端:iperf -p 554-s -u -i 1
参数说明:
-p : 端口号
-s : 标示服务端
-u : 标示udp协议
-i : 检测的时间间隔(单位:秒)
首包结果:

[root@iZbp14kmpcfxulyh8cs2bkZ easydarwin]#  iperf -p 554  -s -u -i 1
------------------------------------------------------------
Server listening on UDP port 554
Receiving 1470 byte datagrams
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local x.x.x.x port 554 connected with x.x.x.x port 45172
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  3.51 MBytes  29.4 Mbits/sec   0.236 ms    0/ 2502 (0%)
[  3]  1.0- 2.0 sec  3.50 MBytes  29.4 Mbits/sec   0.196 ms    0/ 2496 (0%)
[  3]  2.0- 3.0 sec  3.50 MBytes  29.4 Mbits/sec   0.383 ms    0/ 2496 (0%)
[  3]  3.0- 4.0 sec  3.50 MBytes  29.4 Mbits/sec   0.275 ms    0/ 2498 (0%)
[  3]  4.0- 5.0 sec  3.04 MBytes  25.5 Mbits/sec   1.044 ms  278/ 2450 (11%)
[  3]  5.0- 6.0 sec  2.93 MBytes  24.6 Mbits/sec   1.052 ms  401/ 2494 (16%)
[  3]  6.0- 7.0 sec  2.95 MBytes  24.7 Mbits/sec   0.922 ms  402/ 2504 (16%)
[  3]  7.0- 8.0 sec  2.95 MBytes  24.7 Mbits/sec   0.790 ms  397/ 2498 (16%)
[  3]  8.0- 9.0 sec  2.94 MBytes  24.6 Mbits/sec   0.978 ms  397/ 2491 (16%)
[  3]  9.0-10.0 sec  2.95 MBytes  24.7 Mbits/sec   0.972 ms  397/ 2500 (16%)
[  3]  0.0-10.0 sec  31.8 MBytes  26.6 Mbits/sec   0.905 ms 2281/24967 (9.1%)

客户端: iperf -c x.x.x.x -p 554 -u -b 10M -t 10 -i 1 -P 1
参数说明:
-c : 服务端的ip地址
-p : 端口号
-u : 标示udp协议
-b : 每一次发送的数据大小
-t : 总的发送时间(单位:秒)
-i : 发送数据的时间间隔(单位:秒)
-P : 表示线程个数,不指定则默认单线程
发包及结果:

-bash-4.2# iperf -c x.x.x.x -p 554 -u -b 28M -t 10 -i 1 -P 1
------------------------------------------------------------
Client connecting to x.x.x.x, UDP port 554
Sending 1470 byte datagrams, IPG target: 400.54 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local x.x.x.x port 45172 connected with x.x.x.x port 554
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  1.0- 2.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  2.0- 3.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  3.0- 4.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  4.0- 5.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  5.0- 6.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  6.0- 7.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  7.0- 8.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  8.0- 9.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  9.0-10.0 sec  3.50 MBytes  29.4 Mbits/sec
[  3]  0.0-10.0 sec  35.0 MBytes  29.4 Mbits/sec
[  3] Sent 24967 datagrams
[  3] Server Report:
 线程id     时间       接收数据大小     每秒大小       延时    丢包/总包   丢包率
[  3]  0.0-10.0 sec  31.8 MBytes  26.6 Mbits/sec   0.904 ms 2281/24967 (9.1%)
-bash-4.2# 
  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值