Skip to content
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

easily parseable real time output option #444

Open
ili101 opened this issue Jul 23, 2016 · 4 comments
Open

easily parseable real time output option #444

ili101 opened this issue Jul 23, 2016 · 4 comments
Labels
enhancement feat:outputs Issues related to output formats Help Wanted

Comments

@ili101
Copy link

ili101 commented Jul 23, 2016

Hi
I made a GUI for iperf 2 in Powershell:
https://github.com/ili101/PPerf

I want to add iperf 3 support but iperf 3 don't have a parseable real time output option

iperf 2 have CSV output
iperf 3 have JSON output but it's only updates at the end

I don't think JSON can support real time updates because of it's structure, probably why you are updating it only at the end.

Can you add CSV support or something with similar functionality?

Thank you

@ili101
Copy link
Author

ili101 commented Jul 25, 2016

I have managed to parse the text output
by cutting the data by the words starting index position on the [ ID] line
but you have a small bug that some of the lines data sometimes start before the header position

like the total and the 5.01-5.01 lines in this example

-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 127.0.0.1, port 63781
[  6] local 127.0.0.1 port 5201 connected to 127.0.0.1 port 64003
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  6]   0.00-1.01   sec   120 KBytes  0.98 Mbits/sec  0.136 ms  0/15 (0%)  
[  6]   1.01-2.01   sec   128 KBytes  1.05 Mbits/sec  0.137 ms  0/16 (0%)  
[  6]   2.01-3.01   sec   128 KBytes  1.05 Mbits/sec  0.169 ms  0/16 (0%)  
[  6]   3.01-4.01   sec   128 KBytes  1.05 Mbits/sec  0.126 ms  0/16 (0%)  
[  6]   4.01-5.01   sec   128 KBytes  1.04 Mbits/sec  0.113 ms  0/16 (0%)  
[  6]   5.01-5.01   sec  0.00 Bytes  0.00 Mbits/sec  0.113 ms  0/0 (0%)  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  6]   0.00-5.01   sec  0.00 Bytes  0.00 Mbits/sec  0.113 ms  0/79 (0%)  

@bmah888
Copy link
Contributor

bmah888 commented Jul 26, 2016

I wonder if some of the output fields are justified in a funny way. Admittedly I haven't looked into this at all.

If I were going to try parsing this output, I might try instead breaking the line up into "words" separated by some amount of whitespace (rather than by position on the line). Think of the Perl or Python split commands, that's what I'm envisioning.

@ili101
Copy link
Author

ili101 commented Jul 27, 2016

Breaking up the data line by the spaces will be hard because you then need to connect the "words" to there respected header and they will not mach up.
"0.00-1.01 sec" will be broke up to 2 words but its actually one cell data that is "Interval".

braking the data to cells by the header line position (then working on the cell string) is easier

Its not only a machine reading problem, it doesn't look good that some of the data is out of the "imagery table" cell and also don't line up with the other lines

@khutchings85
Copy link

I would also like to see this feature. I understand the JSON structure can't be assembled until the end of the test, so maybe have a minimal JSON object for each reporting interval instead? Or bring back csv support for easy backward compatibility.

@bmah888 bmah888 added the feat:outputs Issues related to output formats label Jul 13, 2020
swlars pushed a commit that referenced this issue May 10, 2024
---------------------

* Notable user-visible changes

  * BREAKING CHANGE: iperf3's authentication features, when used with
    OpenSSL prior to 3.2.0, contain a vulnerability to a side-channel
    timing attack. To address this flaw, a change has been made to the
    padding applied to encrypted strings. This change is not backwards
    compatible with older versions of iperf3 (before 3.17). To restore
    the older (vulnerable) behavior, and hence
    backwards-compatibility, use the --use-pkcs1-padding flag. The
    iperf3 team thanks Hubert Kario from RedHat for reporting this
    issue and providing feedback on the fix. (CVE-2024-26306)(PR#1695)

  * iperf3 no longer changes its current working directory in --daemon
    mode. This results in more predictable behavior with relative
    paths, in particular finding key and credential files for
    authentication. (PR#1672)

  * A new --json-stream option has been added to enable a streaming
    output format, consisting of a series of JSON objects (for the
    start of the test, each measurement interval, and the end of the
    test) separated by newlines (#444, #923, #1098).

  * UDP tests now work correctly between different endian hosts
    (#1415).

  * The --fq-rate parameter now works for --reverse tests (#1632, PR#1667).

  * The statistics reporting interval is now available in the --json
    start test object (#1663).

  * A negative time test duration is now properly flagged as an error
    (IS#1662 / PR#1666).

* Notable developer-visible changes

  * Fixes have been made to better (unofficially) support builds on
    Android (#1641 / #1651) and VxWorks (#1595).

  * iperf3 now builds correctly on architectures without native
    support for 64-bit atomic types, by linking with the libatomic
    library (#1611).
swlars pushed a commit that referenced this issue May 10, 2024
---------------------

* Notable user-visible changes

  * BREAKING CHANGE: iperf3's authentication features, when used with
    OpenSSL prior to 3.2.0, contain a vulnerability to a side-channel
    timing attack. To address this flaw, a change has been made to the
    padding applied to encrypted strings. This change is not backwards
    compatible with older versions of iperf3 (before 3.17). To restore
    the older (vulnerable) behavior, and hence
    backwards-compatibility, use the --use-pkcs1-padding flag. The
    iperf3 team thanks Hubert Kario from RedHat for reporting this
    issue and providing feedback on the fix. (CVE-2024-26306)(PR#1695)

  * iperf3 no longer changes its current working directory in --daemon
    mode. This results in more predictable behavior with relative
    paths, in particular finding key and credential files for
    authentication. (PR#1672)

  * A new --json-stream option has been added to enable a streaming
    output format, consisting of a series of JSON objects (for the
    start of the test, each measurement interval, and the end of the
    test) separated by newlines (#444, #923, #1098).

  * UDP tests now work correctly between different endian hosts
    (#1415).

  * The --fq-rate parameter now works for --reverse tests (#1632, PR#1667).

  * The statistics reporting interval is now available in the --json
    start test object (#1663).

  * A negative time test duration is now properly flagged as an error
    (IS#1662 / PR#1666).

* Notable developer-visible changes

  * Fixes have been made to better (unofficially) support builds on
    Android (#1641 / #1651) and VxWorks (#1595).

  * iperf3 now builds correctly on architectures without native
    support for 64-bit atomic types, by linking with the libatomic
    library (#1611).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feat:outputs Issues related to output formats Help Wanted
Projects
None yet
Development

No branches or pull requests

4 participants