NETHOGS(8)
nethogs π
okay bestie, welcome to the manual page for nethogs, from the System Manager's Manual β a lil' "net top" tool that groups bandwidth per process π
β¨ NAME β¨
nethogs β net top tool grouping bandwidth per process π¦
πΈ SYNOPSIS πΈ
nethogs [-V] [-h] [-x] [-d seconds] [-v mode] [-c count] [-t] [-p] [-s]
[-a] [-l] [-f filter] [-C] [-b] [-g period] [-P pid] [device(s)]
π DESCRIPTION π
So NetHogs is this smol "net top" tool, right? And the way most of those tools do it is they break your traffic down per protocol or per subnet. NetHogs said no π ββοΈ β it groups bandwidth by process, and it does not rely on any special kernel module being loaded. No cap.
Which means: if there's suddenly a whole lot of network traffic happening, you just fire up NetHogs and immediately see which PID is causing it. And if it's some kind of spinning process?? You can literally just kill it. slay π
π Options π
-Vβ prints version. that's it, that's the whole job π-hβ prints available commands usage. your little helper π«Ά-xβ bughunt mode. lowkey implies tracemode too.-dβ delay for update refresh rate, in seconds. default is1.-vβ view mode. the vibes are:0= kB/s,1= total kB,2= total bytes,3= total MB,4= MB/s,5= GB/s. default is0.- and the units, bestie: kB:
2e10bytes, MB:2e20bytes, GB:2e30bytes β¨
- and the units, bestie: kB:
-cβ number of updates. default is0(unlimited β go feral, girl).-tβ tracemode.-pβ sniff in promiscuous mode. not recommended π©-sβ sort output by sent column.-lβ display command line.-aβ monitor all devices, even loopback/stopped ones. inclusivity icon π-Cβ capture TCP and UDP.-bβ Display the program basename.-gβ garbage collection period, in number of refresh. default is50.-Pβ Show only processes with the specified pid(s).-fβ EXPERIMENTAL: specify string pcap filter (liketcpdump). This may be removed or changed in a future version. β οΈ so don't get too attached- device(s) β to monitor. default is all interfaces up and running excluding loopback.
π§ INTERACTIVE CONTROL π§
qβ quit πsβ sort by SENT trafficrβ sort by RECEIVED trafficlβ display command linebβ display the program basenamemβ switch between total (KB, B, MB) and throughput (KB/s, MB/s, GB/s) mode π
π RUNNING WITHOUT ROOT π
So you wanna run this as an unprivileged user? Respect. But nethogs needs the cap_net_admin and cap_net_raw capabilities. And additionally, to display process names, it needs cap_dac_read_search and cap_sys_ptrace capabilities too. No shortcuts, bestie.
You set these on the executable using the setcap(8) command, like this:
sudo setcap "cap_net_admin,cap_net_raw,cap_dac_read_search,cap_sys_ptrace+pe" /usr/local/sbin/nethogs
π Notes π
- When using the
-P <pid>option, in a case where a process exited (normally or abruptly), Nethogs does not track that it exited. So, the operating system might create a new process (for another program) with the same pid. In this case, this new process will be shown by Nethogs. π (pid recycling is a menace, fr fr)
π₯ SEE ALSO π₯
π«Ά AUTHOR π«Ά
Written by Arnout Engelen <arnouten@bzzt.net>.
okay that's the whole page bestie, mwah π this lil' icon is from the System Manager's Manual, the version tag is NETHOGS(8), and it's dated 14 February 2004 β a vintage queen πβ¨ periodt.
π¦ where this page comes from
- alpine 3.24: nethogs-doc 0.8.8-r0 Β· GPL-2.0-or-later
- arch rolling: nethogs 0.8.8-2 Β· GPL
- debian trixie: nethogs 0.8.8-1 Β· GPL-2.0-or-later
- epel 10: nethogs 0.8.8-1.el10_1 Β· GPL-1.0-or-later
- fedora 43: nethogs 0.8.8-3.fc43 Β· GPL-1.0-or-later
- fedora 44: nethogs 0.8.8-4.fc44 Β· GPL-1.0-or-later
- nixos 26.05: nethogs 0.8.8
- nixpkgs unstable: nethogs 0.9.0
- opensuse-leap 16.0: nethogs 0.8.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: nethogs 0.8.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: nethogs 0.8.8-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: nethogs 0.8.8-160000.2.2 Β· GPL-2.0-or-later
- ubuntu resolute: nethogs 0.8.8-1 Β· GPL-2.0-or-later
- ubuntu stonking: nethogs 0.9.0-1ubuntu1 Β· GPL-2.0-or-later
- Copyright (C) 2004 Fabian Frederick <fabian.frederick@gmx.fr>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms