This widget could not be displayed.
Operating System - HP-UX
1845517 Members
3781 Online
110244 Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
New Discussion
This widget could not be displayed.
This widget could not be displayed.

Who & what process has port open ?

 
SOLVED
Go to solution
Jerry_109
Super Advisor

Who & what process has port open ?

# uname -a; model
HP-UX B.11.11 U 9000/800/A500-7X

Hello HP,

How do I figure out "who" or "what process"
has a port open?

Info from "netstat -a" :

Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp 0 0 hohp120.6011 hohp120.58438 ESTABLISHED
4 REPLIES 4
Fred Ruffet
Honored Contributor

Re: Who & what process has port open ?

you can install and use lsof program which will tell you what program uses what port.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Nido
Trusted Contributor

Re: Who & what process has port open ?

try using lsof.
#lsof -ufoo
option pro-duces a listing of all network files OR files belonging to processes owned by user ``foo''.

Regards,
P.Naidu
" Let Villagers Be Happy!! "
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Who & what process has port open ?

Hi Jerry,

Search the forums for 'lsof' to find the depot for 11i. Once it is downloaded, run 'lsof -i tcp:6011'. It will show the process listening at 6011 with it's owner.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steve Steel
Honored Contributor

Re: Who & what process has port open ?

Hi

lsof is good adivce

available at http://hpux.connect.org.uk/


netstat -a|grep tcp|cut -f2 -d"."|while read a b
do
lsof -i tcp:$a 2>/dev/null
done|sort -u

Is fun


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)