The lsof can be used to find the list of processes that have active sockets open.
Let us see the list of current TCP connections using netstat command.
[liz@techpulp ~]# netstat -nt
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.20.24:40816 220.127.116.11:80 ESTABLISHED
tcp 0 0 192.168.20.24:43059 18.104.22.168:80 ESTABLISHED
Now let us find which process has these TCP sockets open using lsof command.