5

How can I see how much network traffic each thread is doing in Linux?

Any information would be useful. (bytes transferred, # of accepts, etc)

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
blackwing
  • 631

2 Answers2

3

You could try ntop.

After installing it, based on what distribution you're using, you will have to start the ntop service. Most probably it will look something like this (check your distro's documentation for proper ntop service starting):

service ntop start

After you successfully started the ntop service, you will be able to access ntop's web interface through your web browser:

http://localhost:3000/

Keep in mind that 3000 is the default port for ntop. If you changed it, you will have to change it in your browser as well. If you installed ntop on a remote machine, instead of "localhost", you will have to enter the proper IP/hostname.

After that, ntop usage is pretty straightforward. Go through its web interface and find the information you need. The web interface itself looks like this:

enter image description here
Source

enter image description here Source

tkit
  • 642
1

There are several applications that can show you a "top"-like list of network traffic for a particular process or thread.

These are the two I've found most useful:

  1. nethogs

    enter image description here

  2. iftop

    enter image description here

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Patkos Csaba
  • 1,735