Analyzing network traffic with iftop

©lightwise, 123rf.com

©lightwise, 123rf.com

Traffic Watch

Sluggish network connections can be nerve-wracking. Checking live statistics about network traffic can help pinpoint the problem. Iftop is a command-line system monitoring tool that can help you identify bandwidth hogs and keep traffic moving.

Iftop (interface top) should be a part of every Linux user's toolbox. The program [1] shows network usage, whereas top and htop show the current CPU load. Iftop is not usually part of the standard installation, however. (See the "Installing iftop" box).

With iftop, you can find out why bandwidth is being eaten up on a network interface. The program shows the network connections between two IP addresses and how many data packets traverse the link. Alternatively, iftop shows the connection on the protocol level, for example, all FTP or HTTP traffic. Thus, iftop is especially good at troubleshooting why a line seems particularly slow.

Getting Started

Start iftop in the terminal with the iftop command. Because the program requires administrator rights, you must be root or start it with sudo .

[...]

Use Express-Checkout link below to read the full article (PDF).