Version 2 (modified by Daniel Kahn Gillmor, 10 years ago) (diff)


using iftop

If you've got a gateway machine for a LAN, and the LAN is seeing congestion on the upstream link, you might want to figure out which client is causing the most traffic.

You should:

apt-get install iftop

then, (also as the superuser), do:

iftop -i "$LAN"

(where $LAN is the name of your internally-connected interface).

then press s once to "hide the source hosts" (this seems backwards to me -- shouldn't it be "dest"?), which causes iftop to aggregate throughput by local machines. you can then press 1, 2, or 3 to sort by total traffic in the last 2, 10, or 40 seconds, respectively. If there's a single culprit, it should rise to the top.