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.

  • How about sudo lsof -i -n -P? – mikewhatever Aug 4 '12 at 11:16

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


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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.