iftop
iftop is a command-line network monitoring tool that displays real-time bandwidth usage by host and connection, similar to top but for network traffic.
iftop captures and analyzes network packets to show which hosts are consuming the most bandwidth on a network interface. It displays active connections in a live-updating table, making it easy to identify traffic patterns and heavy users on your network.
The tool shows source and destination IP addresses (or hostnames), the amount of data sent and received, and peak bandwidth usage. You can sort by different columns, filter by host, and toggle between bytes and packets display.
Example: Running iftop -i eth0 monitors the eth0 network interface and displays a real-time breakdown of traffic flowing through it, updated every second by default. This is useful for troubleshooting network congestion or identifying unexpected traffic sources.