nethogs(8)
Display network traffic usage by process in real-time.
Synopsis
nethogs [OPTION]... [DEVICE]...Description
nethogs is a net top tool that shows bandwidth used by each process instead of traditional per-interface statistics. It sniffs network traffic and groups it by process, displaying which programs are consuming your network connection.
Unlike traditional tools like iftop or nethogs, nethogs lets you see exactly which application is responsible for network activity. It requires root or appropriate capabilities to sniff network traffic.
Common options
| Flag | What it does |
|---|---|
-d DELAY | Set update interval in seconds (default: 1) |
-p | Print output and exit instead of displaying interactive UI |
-a | Monitor all devices instead of just one |
-t | Print total bandwidth at the end (used with -p) |
-c COUNT | Exit after COUNT refreshes (used with -p) |
-s COLUMN | Sort by column (sent, received, or total) |
-v VERSION | Only monitor IPv4 (4) or IPv6 (6) traffic |
-q | Quiet mode, don't print headers |
Examples
Monitor all network devices interactively in real-time
sudo nethogsMonitor only the eth0 device
sudo nethogs eth0Update display every 5 seconds instead of default 1 second
sudo nethogs -d 5Print network usage by process once and exit after 5 updates
sudo nethogs -p -c 5Monitor all available network devices simultaneously
sudo nethogs -aMonitor specific devices eth0 and eth1
sudo nethogs eth0 eth1Check network bandwidth used by Chrome processes
sudo nethogs -p | grep -i chromeMonitor only IPv4 traffic on eth0 device
sudo nethogs -v 4 eth0