Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find ports being used

Status
Not open for further replies.

kouchpotato

Programmer
Nov 2, 2001
38
GB
I am trying to find a way to determine the ports currently in use on my solaris system. I am trying to start a listener on Port 80 and getting an error saying port already in use....

any ideas???????

cheers
 
try this command : netstat -a |grep ESTAB

this could show you what ports has an established connection
 

Another great tool is lsof, this will list all open file descriptors.

-Tony
 
because Solaris "netstat" don't support -p flag as (port) like linux, to find the processes that are bind to a port you can do the following:

# cd /proc
# pfiles * > /tmp/procs

then in the case of your example just search the file "/tmp/procs" for "port: 80", to find all information, include process id.

Regards,

Carlos Almeida,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top