$linuxjunkies
>

nethogs(8)

Display network traffic usage by process in real-time.

UbuntuDebianFedoraArch

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

FlagWhat it does
-d DELAYSet update interval in seconds (default: 1)
-pPrint output and exit instead of displaying interactive UI
-aMonitor all devices instead of just one
-tPrint total bandwidth at the end (used with -p)
-c COUNTExit after COUNT refreshes (used with -p)
-s COLUMNSort by column (sent, received, or total)
-v VERSIONOnly monitor IPv4 (4) or IPv6 (6) traffic
-qQuiet mode, don't print headers

Examples

Monitor all network devices interactively in real-time

sudo nethogs

Monitor only the eth0 device

sudo nethogs eth0

Update display every 5 seconds instead of default 1 second

sudo nethogs -d 5

Print network usage by process once and exit after 5 updates

sudo nethogs -p -c 5

Monitor all available network devices simultaneously

sudo nethogs -a

Monitor specific devices eth0 and eth1

sudo nethogs eth0 eth1

Check network bandwidth used by Chrome processes

sudo nethogs -p | grep -i chrome

Monitor only IPv4 traffic on eth0 device

sudo nethogs -v 4 eth0

Related commands