[Iftop-users] Re: find upload hogs

Paul Warren pdw at ex-parrot.com
Fri, 15 Oct 2010 09:33:13 +0100


On 15/10/2010 02:31, Gordon Gable wrote:
> That does the trick, but thinking about it, if i isolate analysis on
> specific internal networks with -F, viewing sent traffic only and hiding
> destination already comes pretty close to get conclusions.
>
> about the sort order in this specific view, i notice it's not sorted by
> rate over the selected column. what is the sort order?

Even if you only have outgoing traffic only shown, it still sorts by the 
sum of incoming and outgoing, unless you hack the code as described below.

I think ideally it would sort by what you have on screen, but that 
requires a slightly more complicated change to the sort function.

Paul

> 2010/10/15 Paul Warren <pdw@ex-parrot.com <mailto:pdw@ex-parrot.com>>
>
>     On 15/10/2010 00:24, Gordon Gable wrote:
>      > iftop, i mean. sorry.
>      >
>      > 2010/10/14 Gordon Gable <grdngable@gmail.com
>     <mailto:grdngable@gmail.com> <mailto:grdngable@gmail.com
>     <mailto:grdngable@gmail.com>>>
>
>      >
>      >     i help running a small wireless mesh. altough our p2pfilters at
>      >     gateway nodes are fairly acurate, we sometimes find people
>     resorting
>      >     to all kinds of tricks to circumvent those.
>      >
>      >     to ease pinpointing villains, is there a way in iptraf to sort ip
>      >     address by *upload* only?
>      >
>      >     /gordon
>      >
>      >
>
>
>     No - but it's an easy enough change to make if you want to hack it.
>       In ui.c find this bit of code:
>
>     int screen_line_bandwidth_compare(host_pair_line* aa,
>     host_pair_line* bb, int start_div) {
>         int i;
>         for(i = start_div; i < HISTORY_DIVISIONS; i++) {
>             if(aa->recv[i] + aa->sent[i] != bb->recv[i] + bb->sent[i]) {
>                 return(aa->recv[i] + aa->sent[i] < bb->recv[i] +
>     bb->sent[i]);
>             }
>         }
>         return 1;
>     }
>
>     and delete the "recv" part of each of the sums.  I guess it would be
>     nice to sort based on what's on screen, but obviously that's a bit
>     more involved.
>
>     Paul
>
>
>
>     _______________________________________________
>     iftop-users mailing list
>     iftop-users@lists.beasts.org <mailto:iftop-users@lists.beasts.org>
>     http://lists.beasts.org/mailman/listinfo/iftop-users
>
>