Is there a way to obtain the maximum and current data transfer rate (kbps) with ifconfig or route for any given network interface?
I am not sure i completely understand what exactly it is that i am looking for.
I thought about parsing /proc/net/dev and finding the analogy between bytes received and bytes transmmited. Also is MTU the same thing as maximum data transfer rate? if so could i use netstat -in instead?
P.S Working in Java. (ubuntu 10.04)
Reading out
/proc/net/devon a regular base will give you transfer rates.Update (to clarify what I wanted to denote using the wording: “Reading … on a regular base …“):
/proc/bnet/devgives you the amount of data transfered. To get the transfer rate you need to read this twice and divide the difference by the time elapsed between the two reads.