On my system, if I run the netstat for a port, it returns:
$ netstat -nat | grep "60964"
tcp 0 0 192.0.0.1:60964 0.0.0.0:* LISTEN
tcp 59 0 192.0.0.1:60964 192.0.0.6:46962 ESTABLISHED
If I run lsof:
$ lsof -i4 | grep "60964"
process_x 2585 root 189u IPv4 12708 0t0 TCP 192.0.0.1:60964 (LISTEN)
Why is there a difference in the output here? Why isn't lsof detecting the "established" connection.
Thanks!
Edit: I should mention I am the running the above commands as root.