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.
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.
sudo lsof -i -n -P
?