Determine which process is listening on a TCP port in Linux

Note to self...

[root@rhel5-oracle ~]$ lsof -i tcp:1521 -nP
COMMAND  PID   USER   FD   TYPE DEVICE SIZE NODE NAME
tnslsnr 5640 oracle   10u  IPv4  11104       TCP *:1521 (LISTEN)
tnslsnr 5640 oracle   12u  IPv4  11424       TCP 127.0.0.1:1521->127.0.0.1:10948 (ESTABLISHED)
oracle  5742 oracle   16u  IPv4  11423       TCP 127.0.0.1:10948->127.0.0.1:1521 (ESTABLISHED)

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.