2

    I have a nice little headless Debian machine setup for small automated tasks.
But a few days ago i noted there is a big bandwidth RX on this one, more than the one predicted.
    I started iftop but now i only now to what ip's the bandwidth is coming from.

Question: How can i find what process is taking up the most bandwidth on this debian machine ?

Mike

s.mihai
  • 1,511
  • 6
  • 24
  • 27

4 Answers4

2

With iftop, press p to view the port; then with netstat -nutap | grep :PORT. In the last column you can see the process name.

lg.
  • 4,649
  • 3
  • 21
  • 20
2

In relation to the netstat solution by lg:

Once you know the port that the data transfer is using, you can use the lsof tool to find out the process.

lsof -i :6753

The command is a lot easier to remember, but on the downside lsof isn't installed on all systems by default.

Ressu
  • 246
  • 1
  • 5
1

Install nethogs, it's like top but for network bandwidth.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
0

If you know the port used, you can figure out which daemon is using it. Alternatively, you can use pktstat to help. That shows you the port numbers.

sybreon
  • 7,405
  • 1
  • 21
  • 20