I am trying to get all the processes listening for a network connection on Mac OS X.
netstat does not have the
-p option and I am trying with lsof
lsof -i -sTCP:LISTEN
gives me a fair list of listening processes but not all. I can for example telnet to port 10080 where I have a process listening for a connection but this is not shown in the output of
lsof. What am I missing?
$ telnet localhost 10080 Trying ::1... Connected to localhost. Escape character is '^]'. ^] telnet> Connection closed.
$ sudo lsof -n -i | grep 10080 $