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
With iftop, press p to view the port; then with
netstat -nutap | grep :PORT
. In the last column you can see the process name.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.The command is a lot easier to remember, but on the downside
lsof
isn't installed on all systems by default.Install nethogs, it's like top but for network bandwidth.
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.