5

I'm basically looking for a utility that displays which processes are using how much bandwidth, similar to how top displays which processes use how much resources.

tshepang
  • 65,642

6 Answers6

7

Have a look at ntop.org.

tshepang
  • 65,642
tshubitz
  • 406
  • How do you get it to display BW consumption per process? Look at my Answer to see what I'm looking for. Can this do that, or close enough? – tshepang Feb 23 '11 at 09:24
5

NetHogs is the best tool I have found so far that fulfills my need, but sadly needs to be run as root. (via)

tshepang
  • 65,642
1

I would like to add iptraf to the list. http://iptraf.seul.org

Patkos Csaba
  • 2,530
  • I see last update was 2005, and that's worrying. Why do you recommend it? Why use it instead of alternatives? – tshepang Nov 23 '10 at 09:30
  • 1
    Simple to install, simple to use and useful. I started using it about 10 years ago, and never needed a replacement. I am still using it. Netstat shows you just a snapshot (like ps for processes), ntop gives you something like top for the network ... I don't know about NetHogs. You also can use lsof to see which process uses which port if you need. – Patkos Csaba Nov 24 '10 at 15:02
0

netstat can give you usage statistics on a per socket basis.

kasterma
  • 729
  • What command do you use to get usage statistics on a per socket basis? Can you get usage on a per-process basis? – tshepang Mar 01 '11 at 12:18
0

IMO in decreasing order of usefulness, if you want to know what's eating your bandwidth. Of course, to just list and monitor sockets you can watch -d 'sudo ss -tlpn'.

Bandwidth monitor with process info

  • bandwhich: Terminal bandwidth utilization tool. On brew.
  • nethogs: Net top tool grouping bandwidth per process. On Debian repos.
# Show connection but not processes
iptraf-ng
iptop
# Up/down each second
ifstat -bt
sar -n DEV  1
Pablo A
  • 2,712
-1

You can get stats from netstat via the -s flag, and per-process from the -p flag.

peterph
  • 30,838
wspeirs
  • 121