Update README.md

add more syntax
This commit is contained in:
2025-05-12 19:10:33 +02:00
parent d1734c28f6
commit 05052b8179

View File

@@ -5,9 +5,8 @@ A script that uses gnuplot to plot `iperf3` output in realtime.
## iperf3 ## iperf3
``` ```bash
iperf3 -i $PINTERVAL -R -t $PTIME -f k -c $PERFHOST iperf3 -i $PINTERVAL -R -t $PTIME -f k -c $PERFHOST
``` ```
`-i` is the interval in Seconds. Can be a float like `0.1` `-i` is the interval in Seconds. Can be a float like `0.1`
@@ -28,9 +27,8 @@ There exists a [list of public iperf servers](https://iperf.fr/iperf-servers.php
´iperf3` seems to buffer its `stdout`. A tool named `stdbuf` helps achieving realtime output, so the data can be piped into the next tool. ´iperf3` seems to buffer its `stdout`. A tool named `stdbuf` helps achieving realtime output, so the data can be piped into the next tool.
``` ```bash
stdbuf -o0 iperf3 -i $PINTERVAL -R -t $PTIME -f k -c $PERFHOST stdbuf -o0 iperf3 -i $PINTERVAL -R -t $PTIME -f k -c $PERFHOST
``` ```
`-o` refers to the `STDOUT` (there is also `-i` for `STDIN` and `-e` for `STDERR`). `0` will turn buffering off. `L` would enable Line Buffering. `-o` refers to the `STDOUT` (there is also `-i` for `STDIN` and `-e` for `STDERR`). `0` will turn buffering off. `L` would enable Line Buffering.
@@ -43,7 +41,7 @@ stdbuf -o0 iperf3 -i $PINTERVAL -R -t $PTIME -f k -c $PERFHOST
iperf3 example output: iperf3 example output:
``` ```bash
iperf3 -c 192.168.2.70 -f k -t 2 iperf3 -c 192.168.2.70 -f k -t 2
Connecting to host 192.168.2.70, port 5201 Connecting to host 192.168.2.70, port 5201
[ 5] local 192.168.2.199 port 59798 connected to 192.168.2.70 port 5201 [ 5] local 192.168.2.199 port 59798 connected to 192.168.2.70 port 5201
@@ -60,7 +58,7 @@ iperf Done.
``` ```
``` ```bash
awk '/sec/&&!/receiver/&&!/sender/ {print $7}' awk '/sec/&&!/receiver/&&!/sender/ {print $7}'
``` ```
@@ -80,7 +78,7 @@ So this would result in
`feedgnuplot` is a wrapper that makes it simpler to feed data to `gnuplot` in real time. `feedgnuplot` is a wrapper that makes it simpler to feed data to `gnuplot` in real time.
``` ```bash
feedgnuplot --lines --stream --ylabel 'KBytes/sec' --xlabel 'seconds' feedgnuplot --lines --stream --ylabel 'KBytes/sec' --xlabel 'seconds'
``` ```
@@ -97,7 +95,6 @@ feedgnuplot --lines --stream --ylabel 'KBytes/sec' --xlabel 'seconds'
```bash ```bash
stdbuf -o0 iperf3 -i $PINTERVAL -R -t $PTIME -f k -c $PERFHOST | stdbuf -o0 awk '/sec/&&!/receiver/&&!/sender/ {print $7}' | stdbuf -o0 feedgnuplot --lines --stream $PINTERVAL --ylabel 'Kbit/s' --xlabel "$PINTERVAL seconds" stdbuf -o0 iperf3 -i $PINTERVAL -R -t $PTIME -f k -c $PERFHOST | stdbuf -o0 awk '/sec/&&!/receiver/&&!/sender/ {print $7}' | stdbuf -o0 feedgnuplot --lines --stream $PINTERVAL --ylabel 'Kbit/s' --xlabel "$PINTERVAL seconds"
``` ```