-
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
enhancement: timestamp in every output line #909
Comments
I also would be very happy for this option |
On windows, you can use powershell to add the timestamp |
This should be pretty easy for someone to do if they felt like hacking on iperf3. See |
Assuming that accuracy of seconds is sufficient (millisec accuracy is no needed) then the following changes to iperf_printf() can be done to add current time at the beginning of each line (proposed changes are in bold):
It would be useful to also add the time in iperf_err() and iperf_errexit() messages. In addition it would be useful to add errno value to these messages (to debug issues such as #499). Therefore, the suggested changes to these two functions are (changes in bold):
|
Resending - now bold is bold and not ** bold **. Changes to iperf_printf()Assuming that accuracy of seconds is sufficient (millisec accuracy is no needed) then the following changes to iperf_printf() can be done to add current time at the beginning of each line (proposed changes are in bold):
Changes to iperf_err() and iperf_errexit()It would be useful to also add the time in iperf_err() and iperf_errexit() messages. In addition it would be useful to add errno value to these messages (to debug issues such as #499). Therefore, the suggested changes to these two functions are (changes in bold): Add in both functions:
Changes to the 4 fprintf():
Changes to the 2 cJSON_AddStringToObject():
|
…line. Towards #909, inspired by suggestions by @davidBar-On.
…#1028) This flag takes an optional argument, which is a format specification to strftime(3)...this allows for custom timestamp formats. Based on a suggested implementation by @davidBar-On. Towards #909.
iperf 3.7 (cJSON 1.5.2)
Enhancement Request
sometimes especially in wireless roaming test, we need the timestamp in the output per second, so we can know the exact time(in millisecond) that the throughput is going down, it's very helpful in the wireless roaming debugging.
no timestamp for every output line
$ iperf3 -c 127.0.0.1 -t 3 -u
Connecting to host 127.0.0.1, port 5201
warning: Block size 16332 > sending socket buffer size 9216
Increasing socket buffer size to 17356
[ 5] local 127.0.0.1 port 62057 connected to 127.0.0.1 port 5201
[ ID] Interval Transfer Bitrate Total Datagrams
[ 5] 0.00-1.00 sec 144 KBytes 1.18 Mbits/sec 9
[ 5] 1.00-2.00 sec 128 KBytes 1.05 Mbits/sec 8
[ 5] 2.00-3.00 sec 128 KBytes 1.05 Mbits/sec 8
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-3.00 sec 399 KBytes 1.09 Mbits/sec 0.000 ms 0/25 (0%) sender
[ 5] 0.00-3.00 sec 399 KBytes 1.09 Mbits/sec 0.019 ms 0/25 (0%) receiver
$ iperf3 -c 127.0.0.1 -t 3 -u --timestamp
Connecting to host 127.0.0.1, port 5201
warning: Block size 16332 > sending socket buffer size 9216
Increasing socket buffer size to 17356
[ 5] local 127.0.0.1 port 62878 connected to 127.0.0.1 port 5201
Sep 02 15:19:31.524 [ ID] Interval Transfer Bitrate Total Datagrams
Sep 02 15:19:31.524 [ 5] 0.00-1.00 sec 144 KBytes 1.18 Mbits/sec 9
Sep 02 15:19:32.524 [ 5] 1.00-2.00 sec 128 KBytes 1.05 Mbits/sec 8
Sep 02 15:19:33.525 [ 5] 2.00-3.00 sec 128 KBytes 1.05 Mbits/sec 8
Sep 02 15:19:33.525 [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
Sep 02 15:19:33.525 [ 5] 0.00-3.00 sec 399 KBytes 1.09 Mbits/sec 0.000 ms 0/25 (0%) sender
Sep 02 15:19:33.525 [ 5] 0.00-3.00 sec 399 KBytes 1.09 Mbits/sec 0.018 ms 0/25 (0%) receiver
The text was updated successfully, but these errors were encountered: