Operating System - HP-UX
1832512 Members
4652 Online
110043 Solutions
New Discussion

Process listening on which port

 
SOLVED
Go to solution
MohitAnchlia
Frequent Advisor

Process listening on which port

I have a process that runs and connects to a port. I want to know which process is connecting to what port. netstat -an shows the details about ports/ip that's being currently used but it doesn't show the process id. How do I get to the process that's listening on that ip/port
3 REPLIES 3
James George_1
Trusted Contributor
Solution

Re: Process listening on which port

Hi

Do you have lsof ( list of open files )installed on your serer ? . If you have lsof installed , you can do
# lsof | grep

You can get lsof from

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.77/

Rgds/ James
forum is for techies .....heaven is for those who are born again !!
Sandman!
Honored Contributor

Re: Process listening on which port

Use lsof(1) to get that information. You can obtain lsof from:

http://hpux.cs.utah.edu/

...and to get info about port num 2000 do

# lsof -i:2000
Steven E. Protter
Exalted Contributor

Re: Process listening on which port

Shalom,

Having a little trouble with ITRC today.

http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/lsof-4.78/

This program has given me a lot of problem personally. You may need to compile it, but try the depot first.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com