cancel
Showing results for 
Search instead for 
Did you mean: 

Which process-id belongs to a tcp or udp port

SOLVED
Solved!

Which process-id belongs to a tcp or udp port

Hello,

can i find on HP-UX 11.0 which process-id belongs to a specific tcp or ucp port connection, which i see with netstat -an

Berthold
2 REPLIES 2
Robert-Jan Goossens
Honored Contributor
Solution

Re: Which process-id belongs to a tcp or udp port

Message contains a hyperlink
Hi Berthold,

You can with lsof.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.77/

example
# lsof -i tcp:513
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
inetd 982 root 9u inet 0x41e6a068 0t0 TCP *:login (LISTEN)
rlogind 9229 root 0u inet 0x4201e868 0t2665 TCP db001:login->daf68.pg)

Regards,
Robert-Jan
Arunvijai_4
Honored Contributor

Re: Which process-id belongs to a tcp or udp port

Message contains a hyperlink
Hi,

You can do with "lsof". Download and install from,

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.77/

After installing, do a "man lsof" for more details.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"