Results 1 to 3 of 3
Hello, I need to record Tx/Rx bw in my c program at defined intervals. I am aware that there a bunch of available tools but I need a minimal version ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-22-2011 #1
- Join Date
- Apr 2007
Recording bw usage!
I need to record Tx/Rx bw in my c program at defined intervals. I am aware that there a bunch of available tools but I need a minimal version with only Tx/Rx bw with no other details. I have tried the tool bwm-ng which mostly serves my purpose but either it runs continuously in the console or saves result in html file. It does not have any options to save the result in txt file which could have been easy to parse.
Is there any other simple way to record Tx/Rx bw in a program?(without using tools from /proc/net/ or any)
I am using Mandriva Linux 188.8.131.52
- 02-22-2011 #2
if you have a (x)html you can xsl transform it into whatever you want as long the structure of the document is predictable.
- 03-04-2011 #3
- Join Date
- Mar 2011
ifconfig eth0 |grep bytes|cut -d":" -f2|cut -d" " -f1
ifconfig eth0 |grep bytes|cut -d":" -f3|cut -d" " -f1
this commands shoud give you information about rx and tx data on eth0, for example.
Also take a look on rrdtool.