Metric | Command | Comments |
---|---|---|
Disk usage (read and write) |
iostat -x 1 | grep --line-buffered nvme0n1 | awk '{ print $3, $9, $15; fflush(); }' | wesplot -t "iostat" -c "Read KB/s" -c "Write KB/s" -c "Discard KB/s" -u "KB/s"
|
This shows the read, write, and discard KB/s for the nvme0n1 device. If you are not using a NVME disk, you might need to use a different selector. Replace nvme0n1 in the grep clause with your device. To check find device, run iostat and read the output.
|
Network throughput (upload and download) |
S_TIME_FORMAT=ISO sar -n DEV 1 | awk '$2 == "eth0" { print $5/125, $6/125; fflush(); }' | wesplot -t "Network throughput" -u "Mbit/s" -c "Download" -c "Upload"
|
This monitors the interface eth0 . If you want to monitor a different interface, replace the eth0 with the interface you wish to monitor.
|
CPU 0 frequency |
{ while true; do cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq | awk '{ print $1/1000 }'; sleep 1; done } | wesplot -t "CPU 0 freq" -u "MHz"
|
May need to be root to read cpuinfo_cur_freq . In that case, add sudo before cat .
|
CPU 0 temperature |
{ while true; do awk '{ print $1/1000 }' /sys/class/thermal/thermal_zone0/temp; sleep 1; done } | wesplot -t "CPU 0 temp" -u "C"
|
Max CPU temperature may be higher as this is only CPU 0. |
Firefox memory usage |
{ while true; do ps -o rss --sort -rss -p $(pgrep firefox) | head -n2 | awk '{ if ($1 ~ /^[0-9]+$/) print $1/1024; fflush(); }'; sleep 1; done } | wesplot -t "Firefox memory (RSS) usage" -u "MB"
|
If there are multiple firefox processes, this will only show one
|