Somebody asked in Debian group about speed monitoring application. There is a good application for this called conky or watch.
Conky is good for desktop decoration. And watch is pretty in Console. For a lightweight portable script, you need to consider to remove any conky/watch dependency.
Actually we can simplified the process for our own use. Using bash script only, and get rid of conky, to make our monitoring script more transparent.
Monitor in loop
The basic of monitoring is pool a data result for each monitoring interval.
You can do this from bash with this simple while loop.
I know it is weird to have a date while sleeping.
Sample Script, Net Speed
I remember two months ago I have found bash script, combined with answer from stackoverflow, I have rewritten this script for my own purpose.
This script utilize statistic form /sys/class/net/
for dzen2 feed.
Original Source
Rewrite
With slight modification. I remove the dzen stuff. And change the echo to printf. And prepend carriage return.
Complete Script
You can see the result in figure below
Now you can use, modify, and extend this script for your own purpose.
Thank you for reading