V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
fl2d
V2EX  ›  问与答

linxu 哪个命令可以以指定速率发 tcp 包??

  •  
  •   fl2d · 2021-02-06 16:07:58 +08:00 · 791 次点击
    这是一个创建于 1176 天前的主题,其中的信息可能已经有所发展或是发生改变。

    局域网里,就类似于 iperf 那样点对点发包,

    但想指定速率,比如 1 Gbps,

    我是需要测不同速率下机器的功耗。

    4 条回复    2021-02-06 16:17:35 +08:00
    zhs227
        1
    zhs227  
       2021-02-06 16:10:53 +08:00   ❤️ 1
    iperf 带参数使用是可以发不同速率的
    neteroster
        2
    neteroster  
       2021-02-06 16:16:53 +08:00   ❤️ 1
    > -b, --bandwidth n[KM]
    > Set target bandwidth to n bits/sec (default 1 Mbit/sec for UDP, unlimited for TCP). If there are multiple streams (-P flag), the bandwidth limit is applied separately to each stream. You can also add a ’/’ and a number to the bandwidth specifier. This is called "burst mode". It will send the given number of packets without pausing, even if that temporarily exceeds the specified bandwidth limit.

    来自 https://iperf.fr/iperf-doc.php
    fl2d
        3
    fl2d  
    OP
       2021-02-06 16:17:15 +08:00
    @zhs227 啊,果然,-b, 😅 多谢!
    fl2d
        4
    fl2d  
    OP
       2021-02-06 16:17:35 +08:00
    @neteroster 多谢!🙏
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2558 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:40 · PVG 23:40 · LAX 08:40 · JFK 11:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.