This how-to will teach you two commands, iftop and nethogs, that you can use to monitor network traffic on a Linux machine. You can use iftop to view traffic by individual connection, port, network segment, or remote host, which gives you a detailed accounting of all packets coming in and out of your machine. Nethogs is a great program as well, and lets you know which processes are using bandwidth on your computer.
Full story »