TTYPLOT(1)
π TTYPLOT(1) π
okay bestie, welcome to the General Commands Manual section, because today we're talking about ttyplot and honestly? it's iconic. she's a realtime terminal plotting utility and she is so much cooler than she sounds. sit down, grab a boba, let's go π§β¨
β¨ NAME β¨
ttyplot β realtime terminal plotting utility π
πΈ SYNOPSIS πΈ
ttyplot [-2bBfr] [-c plotchar] [-e errcharmax] [-E errcharmin]
[-s softmax] [-S softmin] [-m hardmax] [-M hardmin] [-t title]
[-u unit] [-C colorspec]
ttyplot -v
ttyplot -h
π DESCRIPTION π
So the whole vibe is this: ttyplot takes data from standard input β usually from some tool like ping(1), snmpget(1), netstat(8), ifconfig(8), sar(1), vmstat(8), etc. β and plots it in text mode on a terminal, in real time. no GUI, no browser, no drama. just vibes and ASCII. π¦
She also supports rate calculation for counters and up to two graphs on a single display, using reverse video for the second line or β experimentally β braille or block element line drawing in color. main character energy fr fr. π
The following options are supported:
-2β read two values and draw two plots, the second one in reverse video. π-bβ (Experimental) use braille line drawing instead of block/reverse-video bars. With-2, the two lines are distinguished by color rather than reverse video. Requires a UTF-8 locale and a capable font β otherwise it falls back. π§-Bβ (Experimental) use block element (quadrant) line drawing, like-b. π-fβ (Experimental) fill the area under the line in braille or block mode (line 1). π-Aβ (Experimental) render the plot asaalib(3)ASCII art: smooth lines in plain 7-bit ASCII, for dumb terminals that cannot display braille or block glyphs. Like braille or block mode it draws up to two lines distinguished by color, and-ffills the area under line 1.aalibemits its native 7-bit ramp in a C locale; in a UTF-8 locale it is forced to 8-bit glyphs which are folded back to ASCII, so for the smoothest output run withLC_ALL=C. Available only when compiled with aalib support (make AA=1). π«Ά-rβ calculate counter rate and divide by the measured sample interval. π-cplotchar β use plotchar for the plot line, e.g. `'@ # % .' etc. β¨-eerrcharmax β use errcharmax for the plot error line when the value exceeds hardmax. Default:'e'. π-Eerrcharmin β use errcharmin for the plot error symbol, displayed when the plot value is less than hardmin. Default:'v'. π-ssoftmax β use softmax as the initial maximum value but allow it to grow with input. π±-Ssoftmin β use softmin as the initial minimum value but allow it to shrink with input. π±-mhardmax β use hardmax as a hard value limit after which an error line will be drawn (see-e). Should be greater than hardmin, if set. β οΈ-Mhardmin β use hardmin as a definite minimum limit of the plot range. If a plot value is less than this, the error symbol will be drawn (see-E). β οΈ-ttitle β use title as the plot title. π·οΈ-uunit β label the vertical axis unit. π-Ccolorspec β set colors for plot elements. colorspec is either a predefined scheme name or a comma-separated list of color numbers (0-7):plotchar[/line2],axes,text,title,max_err,min_err. Only the first value, the plot line color, is required; the rest are optional. The optionalline2sets the second line color in braille or block mode. For example'-C 1,2,3,4,5,6','-C 1,2'or'-C 1'. The color numbers are 0 black, 1 red, 2 green, 3 yellow, 4 blue, 5 magenta, 6 cyan and 7 white. Alternatively, colorspec may name a predefined scheme:dark1ordark2for dark terminals,light1orlight2for light terminals. π-vβ print the current version and exit. β-hβ print this help message and exit. β
π KEY BINDINGS π
When reading data from a pipe, ttyplot accepts the following commands typed at the terminal:
qβ quit. bye bestie πrβ toggle "rate mode" on and off. πCtrl-Lβ full screen redraw. β¨
Heads up: these commands do not work when standard input is a terminal; in that case quit with 'Ctrl-C'. π«Ά
π EXAMPLES π
CPU usage from vmstat(8) using awk(1) to pick the right column:
vmstat -n 1 \
| gawk '{ print 100-int($(NF-2)); fflush(); }' \
| ttyplot
CPU usage from sar(1) with title and fixed scale to 100%:
sar 1 \
| gawk '{ print 100-int($NF); fflush(); }' \
| ttyplot -s 100 -t "cpu usage" -u "%"
Memory usage from sar(1), using perl(1), to pick the right column:
sar -r 1 \
| perl -lane 'BEGIN{$|=1} print "@F[5]"' \
| ttyplot -s 100 -t "memory used %" -u "%"
Number of processes in running and io blocked state:
vmstat -n 1 \
| perl -lane 'BEGIN{$|=1} print "@F[0,1]"' \
| ttyplot -2 -t "procs in R and D state"
Load average via uptime(1) and awk(1):
{ while true; do
uptime | gawk '{ gsub(/,/, ""); print $(NF-2) }'
sleep 1
done } | ttyplot -t "load average" -s load
Ping plot with sed(1):
ping 8.8.8.8 \
| sed -u 's/^.*time=//g; s/ ms//g' \
| ttyplot -t "ping to 8.8.8.8" -u ms
The same ping plot, drawn with braille (see -b):
ping 8.8.8.8 \
| sed -u 's/^.*time=//g; s/ ms//g' \
| ttyplot -b -t "ping to 8.8.8.8" -u ms
The same ping plot, with custom colors for the line, axes, text and title (see -C):
ping 8.8.8.8 \
| sed -u 's/^.*time=//g; s/ ms//g' \
| ttyplot -t "ping to 8.8.8.8" -u ms -C 2,3,4,5
WiFi signal level in -dBM (higher is worse) using iwconfig(8):
{ while true; do
iwconfig 2>/dev/null \
| grep "Signal level" \
| sed -u 's/^.*Signal level=-//g; s/dBm//g'
sleep 1
done } | ttyplot -t "wifi signal" -u "-dBm" -s 90
CPU temperature from proc;
{ while true; do
awk '{ printf("%.1f0, $1/1000) }' \
/sys/class/thermal/thermal_zone0/temp
sleep 1
done } | ttyplot -t "cpu temp" -u C
Fan speed from sensors(1) using grep(1), tr(1) and cut(1):
{ while true; do
sensors | grep fan1: | tr -s " " | cut -d" " -f2
sleep 1
done } | ttyplot -t "fan speed" -u RPM
Bitcoin price chart using curl(1) and jq(1):
{ while true; do
curl -sL https://api.coindesk.com/v1/bpi/currentprice.json \
| jq .bpi.USD.rate_float
sleep 600
done } | ttyplot -t "bitcoin price" -u usd
Stock quote chart:
{ while true; do
curl -sL https://api.iextrading.com/1.0/stock/googl/price
echo
sleep 600
done } | ttyplot -t "google stock price" -u usd
Prometheus load average via node_exporter:
{ while true; do
curl -s http://10.4.7.180:9100/metrics \
| grep "^node_load1 " \
| cut -d" " -f2; sleep 1
done } | ttyplot
π§ Network/disk throughput examples π§
ttyplot supports two-line plots for in/out or read/write. obsessed. π
Local network throughput for all interfaces combined from sar(1):
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':
ttg -i 10 -u Mb 10.23.73.254 public 9 \
| gawk '{ print $5,$8; fflush(); }' \
| ttyplot -2 -u Mb/s
SNMP network throughput for an interface using snmpdelta(1):
snmpdelta -v 2c -c public -Cp 10 \
10.23.73.254 1.3.6.1.2.1.2.2.1.{10,16}.9 \
| gawk '{ print $NF/1000/1000/10; fflush(); }' \
| ttyplot -2 -t "interface 9 throughput" -u Mb/s
Disk throughput from iostat(1):
iostat -xmy 1 nvme0n1 \
| stdbuf -o0 tr -s " " \
| stdbuf -o0 cut -d " " -f 4,5 \
| ttyplot -2 -t "nvme0n1 throughput" -u MB/s
π Rate calculator for counters π
ttyplot also supports counter style metrics, calculating a rate by measuring time difference between samples. no cap. π
SNMP network throughput for an interface using snmpget(1):
{ while true; do
snmpget -v 2c -c public \
10.23.73.254 1.3.6.1.2.1.2.2.1.{10,16}.9 \
| awk '{ print $NF/1000/1000; }'
sleep 10
done } | ttyplot -2 -r -u "MB/s"
Local interface throughput using ip(8) and jq(1):
{ while true; do
ip -s -j link show enp0s31f6 \
| jq '.[].stats64.rx.bytes/1024/1024, \
.[].stats64.tx.bytes/1024/1024'
sleep 1
done } | ttyplot -r -2 -u "MB/s"
Prometheus node exporter disk throughput for /dev/sda:
{ while true; do
curl -s http://10.11.0.173:9100/metrics \
| awk '/^node_disk_.+_bytes_total{device="sda"}/ {
printf("%f0, $2/1024/1024);
}'
sleep 1
done } | ttyplot -r -2 -u MB/s -t "10.11.0.173 sda writes"
π«Ά AUTHORS π«Ά
ttyplot is written by: Antoni Sawicki <tenox@google.com>, Edgar Bonet <linux@edgar-bonet.org> and Sebastian Pipping <sebastian@pipping.org>.
Its readme was converted into this manual page by Sijmen J. Mulder <ik@sjmulder.nl>. thank you kings ππ
π BUGS π
By default standard input and output are buffered. This can be worked around in various ways: http://www.perkin.org.uk/posts/how-to-fix-stdio-buffering.html. π
When there is no more data, ttyplot prints "input stream closed" and waits rather than quitting (prior to version 1.5 it quit). The screen is normally erased on exit because of the terminal's alternate screen: https://invisible-island.net/xterm/xterm.faq.html#xterm_tite; this can be worked around, for example:
echo 1 2 3 | TERM=vt100 ttyplot
When running interactively and non-numeric data is entered (e.g. some key) ttyplot hangs. Press 'Ctrl^J' to reset. π
okay that's the whole page bestie, you're fully caught up π β¨
this lil slice of the Debian manual collection was last touched on June 23, 2026, and it lives in the TTYPLOT(1) page of the General Commands Manual β so go plot something pretty, you've got this πππ¦π
π¦ where this page comes from
- fedora 43: ttyplot 1.7.6-1.fc43 Β· Apache-2.0
- fedora 44: ttyplot 1.7.6-1.fc44 Β· Apache-2.0
- nixpkgs unstable: ttyplot 1.7.6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms