richard lucassen wrote:
On Mon, 14 Nov 2005 17:23:49 +0200 Aidas Kasparas a.kasparas@gmc.lt wrote:
iftop is fantastic tool! Thanks for it.
On the other hand, I found little strange when it's scale ends at 977kb with traffic in the ranges 256+ .. ~1000 kb and then jumps right to 9.54Mb. If someone has 1-1.5Mbit (and I'm one of such), then suddenly all the graphs become very small. I tried to add more steps and at the same time move to base 1024.
Attached patch solves these problems. Unfortunately, I had no setup to test correctness of this patch for speeds above 2Mbps.
What about the option e.g. "-m 1536k"?
OK, that option works, but is not allways convienient: -- it requires either extra typing every time or use of extra script/alias; -- it is one extra thing to tell to a person to whom you introduce iftop; -- it is one more thing to maintain when one changes speeds (agree, not a everyday activity, but if you support a lot of people to whom you're not an ISP, and they tend to enter commands letter by letter, how you wrote them, catching wrong limit is a nuisance).
On the other hand, I do not propose significant/complicated code change in my patch. Infrastructure for automatic scaling is in present code, what I propose is to add several extra steps at better defined points.
What I would like to see more is an optional automatic scaling back, if traffic is significantly less than current scale for extended period of time.