esnet / iperf

iperf3: A TCP, UDP, and SCTP network bandwidth measurement tool
Other
6.93k stars 1.28k forks source link

Failed to save iperf3 result in a txt.file #1769

Closed xuankeyu closed 1 month ago

xuankeyu commented 1 month ago

Dear all. I want to measure bandwidth, bitrate and some network things using iperf3. And i want to save the measurement results in a text file which called result.txt. But it shows nothing in the text file. How can i let result show in my text flie? And next i will show my problem to you in detail. So first i create two virtual stations using mininet-WiFi by command sudo mn --wifi. Then i set station1 as server: Screenshot from 2024-09-18 16-06-02 And let station2 to be the client. It shows that iperf3 can work successfully. Screenshot from 2024-09-18 16-13-11 Next i want to save the iperf3 result into a result.txt (rediretion)with command sta2 iperf3 -c sta1 -t 5 --logfile result.txt. it works for a while but shows nothing in result.txt. Screenshot from 2024-09-18 16-16-24 And i also tried sta2 iperf3 -c sta1 -t 5 >result.txt It has same result. Can anybody tell me how to save iperf3 result in a text file? Thanks in advance!

BW Keyu

d3cxxxx commented 1 month ago

The --logfile does work on my linux box. Maybe, try adding --forceflush (as that helps on some platforms)

iperf3 --forceflush -c sta1 -t5 --logfile result.txt

xuankeyu commented 1 month ago

Dear, sadly it's not working for me. May i see how do you perform such measurement process step by step? I just want to make sure that problem is not on the dependency or something. Only one screenshot is enough for me to understand. Thanks so much for helping me. Btw my OS is Ubuntu 22.04 and Iperf3 is version 3.9

BW Keyu

xuankeyu commented 1 month ago

I found out the issue and fixed it, Thanks for helping me.