The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 08-03-2007
ramosbrazil ramosbrazil is offline
Registered User
 

Join Date: Aug 2007
Posts: 4
Thumbs up Re: Command to know port no.

Hi,

netstat in Solaris will not show which process is using certain port, do fix that try to use pfiles, this is a cool tool in Solaris which shows you all the files openned by the process, since a connection is a file in Unix , using pfiles is easy. Look the following shell script :

-----
for a in `ps -ef | nawk '{print $2}'`
do
pfiles $a | grep 80 (your port number)
done
-----

Later you can automate an improve this script, this is just to give U a clue how to find your stuff there, hope that helps.

Regarding,

Fernando Ramos.
Reply With Quote