-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use the iperf library to obtain bandwidth information in real-time at intervals? #1711
Comments
As far as I am aware there is no such capability in iperf3. One |
Thank you very much for your answer. I took a brief look at the iperf3 source code and it indeed does not support this feature. Currently, I am doing it like this: first, I set the JSON streaming output with I look forward to iperf3 supporting this feature through a callback function. Thank you again. |
Thanks for the detailed explanation. Not sure how easy/difficult it is to implement that, but Just to make sure. Are you looking for a callback at the end of the test, so there will be no need to wait the 2 seconds, something like the function bellow that will set JSON file output and will define the callback at the end of the test, something like: void end_of_test_callback(struct iperf_test *test);
int iperf_set_test_json_end_of_test_callback(
struct iperf_test,
(*json_callback)(struct iperf_test *),
char *logfile_name
); Or, something else? |
Thank you very much for your reply. I hope to obtain bandwidth information in real-time at each time interval, rather than at the end of the test. The 2 seconds wait is to ensure that the test data is written into the logfile file. I think an interval event callback function should be added, but I feel it might not be easy to implement (I am not familiar with the iperf3 source code). |
I compiled iperf into a library and then used it in my code. I want to obtain the bandwidth information once every interval.
What should I do? Thank you.
The text was updated successfully, but these errors were encountered: