How do determine how much bandwidth a process is using in Linux
You can use
iptraf
or
iftop -P
to identify connections that consume much of your bandwidth. A connection is identified by a pair of (localip:port, remoteip:port). You can then use
netstat -tunp
to look up what process uses that connection. Mostly however, you will be able to tell what service is responsible only by looking at the port, e.g. if the connection uses localip:80
on the local side its probably your webserver ;-)
Well, there is iftop
but that only shows the source and destination, not the program causing the traffic.
Edit:
Just found nethogs
. It does exactly what you want.