How to find port number for a particular process id in unix?

user1857216 picture user1857216 · Nov 27, 2012 · Viewed 44.1k times · Source

In UNIX OS, how can I find the port number when i know the process name or pid ?

Answer

Chris Eberle picture Chris Eberle · Nov 27, 2012
netstat -pl | grep NAME_OR_PID