[Iftop-users] iftop : HISTORY_DIVISIONS set to 1 means : no more sent bar....

Paul Warren pdw at ex-parrot.com
Fri, 24 Mar 2006 16:46:04 +0000


Without looking at the code, I'd guess it's due to the fact that it
sorts on the second column.  I suspect that if you find the bit of code
that chooses which column to sort on and change that to 1, it'll start
working.

Paul

On Fri, Mar 24, 2006 at 05:42:52PM +0100, franck villaume wrote:
> Hi,
> 
> I was playing around a little bit with iftop when I decided to modify it 
> as I wished to see only one HISTORY_DIVISIONS column : 2s column.
> 
> I modified the ui.c file like this :
> 
> ---------------------------------------------------
> diff -Naur ui.c ui.c.new
> --- ui.c        2005-10-26 22:12:33.000000000 +0200
> +++ ui.c.new    2006-03-23 13:40:42.000000000 +0100
> @@ -28,7 +28,7 @@
> 
>   #define HOSTNAME_LENGTH 256
> 
> -#define HISTORY_DIVISIONS   3
> +#define HISTORY_DIVISIONS   1
> 
>   #define HELP_TIME 2
> 
> @@ -55,7 +55,7 @@
> 
> 
>   /* 2, 10 and 40 seconds */
> -int history_divs[HISTORY_DIVISIONS] = {1, 5, 20};
> +int history_divs[HISTORY_DIVISIONS] = {1};
> 
>   #define UNIT_DIVISIONS 4
>   char* unit_bits[UNIT_DIVISIONS] =  { "b", "Kb", "Mb", "Gb"};
> -----------------------------------------------------
> 
> Then the sent bar is no more visible.
> I have one screenshot available.
> 
> If I set HISTORY_DIVISIONS to 2 and
> history_divs[HISTORY_DIVISIONS] = {1, 5}
> then sent bar is back.
> 
> Any ideas what I made wrong ?
> 
> 
> -- 
> Franck VILLAUME
> fvillaume@ipnotic-telecom.fr
> ****************************
> 
> _______________________________________________
> iftop-users mailing list
> iftop-users@lists.beasts.org
> http://lists.beasts.org/mailman/listinfo/iftop-users