#12 Measure real interface bandwidth, not just own data

open
nobody
None
5
2008-10-01
2008-10-01
Vladimir Stojic
No

When someone uses linux box as a router and already has, let's say 10Mbps of traffic going in and out of the machine, and then starts iperf, which results are shown? It looks to me that iperf only shows it's own data sent/received which in this case is NOT the real bandwidth avaliable. And if one wants to make an objective measurement, all user traffic has to be stoped, so iperf can exclusively use that link. In most cases this is not acceptable.

So, I propose to implement a command line option which would expect interface name as an argument and then get the counters for that interface from /proc/net/dev just when the test is starting and at the end of the test. This way iperf's own measurement would give SPARE bandwidth figures, and the data from /proc/net/dev would give REAL bandwidth figures.

I tried to make that with perl using iperf but I cannot get the perfect sync as iperf is sometimes faster and other times slower in setting up and begining the tests.

Discussion