interface as char instead of integer, which results in correct commandline output http://lists.beasts.org/pipermail/iftop-users/2014-March/000413.html - added 001-Avoid-32-bit-overflow-for-rates-when-calculating-bar.patch http://lists.beasts.org/pipermail/iftop-users/2014-March/000414.html - added 002-scale-up-to-tbit.patch : Extend the scale[] array up to terabit. 10gbit is not uncommon, 100gbit 40 and 100 gbit are coming, 400 gbit and terabit are future possibilities. - 003-rateidx_init-fix.patch : When calculating the first rateidx, we were overshooting to the next scale. Fix that. - 004-iftop-unlimited_text_output.patch : Allow unlimited number of lines in text output, using "iftop -t -L 0" OBS-URL: https://build.opensuse.org/package/show/network:utilities/iftop?expand=0&rev=24
42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
http://lists.beasts.org/pipermail/iftop-users/2014-March/000414.html
|
|
|
|
From: Hans Fugal <hans@fugal.net>
|
|
Date: Fri, 7 Mar 2014 13:22:18 -0800
|
|
Subject: [PATCH 2/3] scale[] up to tbit
|
|
|
|
Extend the scale[] array up to terabit. 10gbit is not uncommon,
|
|
100gbit 40 and 100 gbit are coming, 400 gbit and terabit are future
|
|
possibilities.
|
|
---
|
|
ui.c | 17 ++++++++++-------
|
|
1 file changed, 10 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/ui.c b/ui.c
|
|
index 8a3b9d0..d1500ad 100644
|
|
--- a/ui.c
|
|
+++ b/ui.c
|
|
@@ -74,13 +74,16 @@ static struct {
|
|
double max;
|
|
int interval;
|
|
} scale[] = {
|
|
- { 64000, 10 }, /* 64 kbit/s */
|
|
- { 128000, 10 },
|
|
- { 256000, 10 },
|
|
- { 1000000, 10 }, /* 1 Mbit/s */
|
|
- { 10000000, 10 },
|
|
- { 100000000, 100 },
|
|
- { 1000000000, 100 } /* 1 Gbit/s */
|
|
+ { 64000, 10 }, /* 64 kbit/s */
|
|
+ { 128000, 10 },
|
|
+ { 256000, 10 },
|
|
+ { 1000000, 10 }, /* 1 Mbit/s */
|
|
+ { 10000000, 10 },
|
|
+ { 100000000, 100 },
|
|
+ { 1000000000, 100 }, /* 1 Gbit/s */
|
|
+ { 10000000000, 100 },
|
|
+ { 100000000000, 100 },
|
|
+ { 1000000000000, 100 }, /* 1 Tbit/s */
|
|
};
|
|
static int rateidx = 0, wantbiggerrate;
|
|
|