3

How can I get a list of programs that are currently connected to (and are receiving data) from the Internet?

Commands like iftop are good but does not show statistics based on process.

1
  • How about sudo lsof -i -n -P? Aug 4, 2012 at 11:16

2 Answers 2

3

If you just want to see apps that are using internet, use something like

lsof -P -i -n | cut -f 1 -d " "| uniq | tail -n +2

But, if you want to see the actual in/out rate for a certain app, use nethogs

1

The command

    netstat -ap

will display all TCP, UDP, and (local) Unix-domain sockets, their status, the addresses of the endpoints and the process that owns the socket. Run it as root to see process information for processes that are not owned by your user.

1
  • Nailed it. +1 was the least I could do to support your answer. Aug 4, 2012 at 12:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .