LinuxCommandLibrary

iftop

TLDR

Show bandwidth usage on default interface

$ sudo iftop
copy
Show bandwidth usage on a specific interface
$ sudo iftop -i [interface]
copy
Show bandwidth usage with port information
$ sudo iftop -P
copy
Disable bar graphs of traffic
$ sudo iftop -b
copy
Don't resolve hostnames
$ sudo iftop -n
copy

SYNOPSIS

iftop [options]

DESCRIPTION

iftop displays bandwidth usage on a network interface, broken down by connection. It shows which hosts are communicating and how much data is being transferred, updated in real time.
The display shows source and destination hosts, with bar graphs indicating traffic volume. Three columns show bandwidth over 2, 10, and 40-second intervals. Totals are shown at the bottom.
Press ? during operation to see interactive commands for filtering, sorting, and display options.

PARAMETERS

-i INTERFACE

Listen on specified interface
-P
Show port numbers as well as host names
-n
Don't do hostname lookups
-N
Don't convert port numbers to service names
-b
Don't display bar graphs
-B
Display bandwidth in bytes rather than bits
-f FILTER
Use filter code (pcap syntax)
-F NET/MASK
Show traffic in/out of network

CAVEATS

Requires root privileges or appropriate capabilities for packet capture. High-bandwidth interfaces may cause high CPU usage. DNS lookups can slow initial display; use -n to disable.

HISTORY

iftop was written by Paul Warren and Chris Sherlock, inspired by the top utility. It was first released in 2002 and has become a standard tool for real-time network bandwidth monitoring.

SEE ALSO

nethogs(8), tcpdump(8), ifstat(1)

Copied to clipboard