title: Find a process id using netstat in combination with ps
body: <p>I want to find the process id using netstat and see how long this process has been running by using ps.  I currently have two separate commands to do this.  How do I do it with one command?</p>
  
  <pre><code>netstat -anp | grep http | grep ESTABLISHED | awk {'print $7}' | awk -F '/' {'print $1'}
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>ps -eo pid,uid,ruser,etime | grep someuser
  </code></pre>