title: Get the port number from the process id in UNIX
body: <p>I am trying to get the port number for the running process in UNIX.</p>
  
  <p>below command gives me process ID:</p>
  
  <pre><code>ps -ef | grep process_name
  
  502   741   389   0 11:02AM ttys000    0:00.00 grep process_name
  </code></pre>
  
  <p>Can someone please help me on how to get the ports used by the process. Thanks!</p>