# 切换到管理员权限 PS C:\Users\*******> sudo # 查找, 确认存在iperf3, 版本3.16 PS C:\Users\*******> choco search iperf Chocolatey v2.3.0 iperf2 2.2.0 [Approved] iperf3 3.16.0 [Approved] Downloads cached for licensed users 2 packages found. # 执行安装&自动确认 PS C:\Users\*******> choco install iperf3 -y Chocolatey v2.3.0 Installing the following packages: iperf3 By installing, you accept licenses for the packages. Downloading package from source 'https://community.chocolatey.org/api/v2/' Progress: Downloading iperf3 3.16.0... 100% iperf3 v3.16.0 [Approved] iperf3 package files install completed. Performing other installation steps. File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded. Hashes match. Hashes match. Extracting C:\Users\*******\AppData\Local\Temp\chocolatey\iperf3\3.16.0\iperf3.16_64.zip to C:\ProgramData\chocolatey\lib\iperf3\tools... C:\ProgramData\chocolatey\lib\iperf3\tools ShimGen has successfully created a shim for iperf3.exe The install of iperf3 was successful. Deployed to 'C:\ProgramData\chocolatey\lib\iperf3\tools' Chocolatey installed 1/1 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). # 验证安装 PS C:\Users\*******> iperf3 -v iperf 3.16 (cJSON 1.7.15) CYGWIN_NT-10.0-19045 DESKTOP-7NHNS3C 3.4.10-1.x86_64 2023-11-29 12:12 UTC x86_64 Optional features available: CPU affinity setting, authentication, support IPv4 don't fragment, POSIX threads # 测试下载bandwidth PS C:\Users\*******> iperf3 -c 10.100.100.20 -t 32 -R Connecting to host 10.100.100.20, port 5201 Reverse mode, remote host 10.100.100.20 is sending [ 5] local 10.100.100.5 port 54086 connected to 10.100.100.20 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 283 MBytes 2.37 Gbits/sec [ 5] 1.00-2.02 sec 287 MBytes 2.37 Gbits/sec ... [ 5] 31.00-32.01 sec 286 MBytes 2.37 Gbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-32.02 sec 8.85 GBytes 2.37 Gbits/sec 93 sender [ 5] 0.00-32.01 sec 8.84 GBytes 2.37 Gbits/sec receiver iperf Done. # 测试上传bandwidth PS C:\Users\*******> iperf3 -c 10.100.100.20 -t 32 Connecting to host 10.100.100.20, port 5201 [ 5] local 10.100.100.5 port 54089 connected to 10.100.100.20 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 281 MBytes 2.34 Gbits/sec [ 5] 1.00-2.00 sec 282 MBytes 2.37 Gbits/sec ... [ 5] 31.01-32.01 sec 283 MBytes 2.37 Gbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 5] 0.00-32.01 sec 8.84 GBytes 2.37 Gbits/sec sender [ 5] 0.00-32.01 sec 8.84 GBytes 2.37 Gbits/sec receiver iperf Done. # 卸载 PS C:\Users\*******> choco uninstall iperf3 -y Chocolatey v2.3.0 Uninstalling the following packages: iperf3 iperf3 v3.16.0 Skipping auto uninstaller - No registry snapshot. iperf3 has been successfully uninstalled. Chocolatey uninstalled 1/1 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).