ttyplot

Realtime terminal plotter
git clone git://git.sgregoratto.me/ttyplot
Log | Files | Refs | README | LICENSE

commit 421683460b11e355d5703d67c1d83344ac2c0195
parent 743b1d9365ddd741e75b8bb402fde14d9bfa1062
Author: Antoni Sawicki <as@tenoware.com>
Date:   Tue, 23 Oct 2018 00:24:39 -0700

readme fixes

Diffstat:
MREADME.md | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md @@ -67,6 +67,8 @@ ping 8.8.8.8 | sed -u 's/^.*time=//g; s/ ms//g' | ttyplot -t "ping to 8.8.8.8" - ``` + + two line throughput examples ============================ ttyplot supports two line plot for in/out or read/write @@ -76,12 +78,12 @@ ttyplot supports two line plot for in/out or read/write sar -n DEV 1 | gawk '{ if($6 ~ /rxkB/) { print iin/1000; print out/1000; iin=0; out=0; fflush(); } iin=iin+$6; out=out+$7; }' | ttyplot -2 -u "MB/s" ``` -### snmp network throughput for an interface using [ttg](https://github.com/tenox7/ttg) and two lines plot +### snmp network throughput for an interface using [ttg](https://github.com/tenox7/ttg) ``` ttg -i 10 -u Mb 10.23.73.254 public 9 | gawk 'BEGIN { getline; } { print $5,$8; fflush(); }' | ttyplot -2 -u Mb/s ``` -### snmp network throughput for an interface using snmpdelta with two lines plot +### snmp network throughput for an interface using snmpdelta ``` snmpdelta -v 2c -c public -Cp 10 10.23.73.254 1.3.6.1.2.1.2.2.1.10.9 1.3.6.1.2.1.2.2.1.16.9 | gawk '{ print $NF/1000/1000/10; fflush(); }' | ttyplot -2 -t "ifindex 9 throughput" -u Mb/s ``` @@ -92,13 +94,15 @@ iostat -xmy 1 | gawk '/^nvme0n1/ { print $4,$5; fflush(); }' | ttyplot -2 -t "nv ``` + + rate calculator for counters ============================ ttyplot supports calculating rate on "counter" style metrics, the rate is divided by measured time difference between samples -### snmpget counter rate for interface in MB/s using two plot lines +### snmp network throughput for an interface using snmpget ``` -{ while true; do snmpget -v 2c -c public 10.23.73.254 1.3.6.1.2.1.2.2.1.10.9 1.3.6.1.2.1.2.2.1.16.9 | gawk '{ print $NF/1000/1000; fflush(); }'; sleep 10; done } | ttyplot -2 -r -u "MB/s" +{ while true; do snmpget -v 2c -c public 10.23.73.254 1.3.6.1.2.1.2.2.1.10.9 1.3.6.1.2.1.2.2.1.16.9 | gawk '{ print $NF/1000/1000; fflush(); }'; sleep 10; done } | ttyplot -2 -r -u "MB/s" ``` ### prometheus node exporter disk throughput for sda device using two lines @@ -107,6 +111,8 @@ ttyplot supports calculating rate on "counter" style metrics, the rate is divide ``` + + options ======= @@ -130,6 +136,8 @@ ttyplot [-r] [-c plotchar] [-s softmax] [-m hardmax] [-t title] [-u unit] ``` + + stdio buffering =============== by default stdio is buffered, you can work around it in [various ways](http://www.perkin.org.uk/posts/how-to-fix-stdio-buffering.html)