You are not logged in.
Pages: 1
Topic closed
Offline
cat /sys/class/net/eth0/statistics/rx_bytes
Change eth0 as needed.
Edit: I do my dwmStatus bar in C just by reading from a handful of files under /sys/class/. This is several orders of magnitude less resource intensive than bash functions using all sorts of whacky monitoring tools.
Last edited by Trilby (2012-05-30 17:44:34)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I do my dwmStatus bar in C
Sorry for the OT, but can you post the code / share a link?
Offline
Just put it up on github. Please see the README before you attempt to use it.
Edit: I have a cleaner version (fewer unnecessary variables) on my work computer. I'll update with that tomorrow. Nonetheless, this should serve as an adequate template, and it works well - I'm still using this version on my home computer. That version also has the battery monitor code ... this one just has an empty placeholder for it.
Last edited by Trilby (2012-05-30 20:04:51)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Try vnstat its a simple cli, with optional graph outputting capabilities.
Or nethogs if you want the data to be sorted into programs...
Offline
Thanks for the contribution, but this thread is very old and the OP has not been back since 2015. Closing.
Offline
Pages: 1
Topic closed