title: how to get process id attached with particular port in sunos
body: <p>I am trying to get processes attached with a port 7085 on SunOS. i tried following commands.</p>
  
  <p><code>netstat -ntlp | grep 7085</code> didn't return anything</p>
  
  <p><code>netstat -anop | grep 7085</code> tried this one also. This switches are not valid in SunOs</p>
  
  <p>I am getting the following output.</p>
  
  <p><code>#netstat -anop</code></p>
  
  <p><code>netstat: illegal option -- o</code></p>
  
  <p><code>usage: netstat [-anv] [-f address_family]</code></p>
  
  <p><code>netstat [-n] [-f address_family] [-P protocol] [-g | -p | -s [interval [count]]]</code></p>
  
  <p><code>netstat -m [-v] [interval [count]]</code></p>
  
  <p><code>netstat -i [-I interface] [-an] [-f address_family] [interval [count]]</code></p>
  
  <p><code>netstat -r [-anv] [-f address_family|filter]</code></p>
  
  <p><code>netstat -M [-ns] [-f address_family]</code></p>
  
  <p><code>netstat -D [-I interface] [-f address_family]</code></p>
  
  <p>The version of SunOS is SunOS 5.10. I believe netstat is the only command can do this. </p>
  
  <p>What is the exact switches for netstat which will give me the process id attached with port?</p>