Operating System - HP-UX
1827286 Members
1647 Online
109717 Solutions
New Discussion

How to know which process is bound to a port

 
Enrico Venturi
Super Advisor

How to know which process is bound to a port

Hi colleagues,
I'm using a 3PP software which binds to a DLPI to use a LAN card; the bind fails because the device is busy.
How can I get the Id of the process already bound to that DLPI?

thanks
Enrico
6 REPLIES 6
Ludovic Derlyn
Esteemed Contributor

Re: How to know which process is bound to a port

Hi

Use lsof

lsof -i TCP:xxxx

regards

L-DERLYN
Fat Scrape
Honored Contributor

Re: How to know which process is bound to a port

Hi Enrico,

Try with lsof

Fat
Enrico Venturi
Super Advisor

Re: How to know which process is bound to a port

Hi Ludovic,
what should I put in place of xxxx?
sorry for my stupid question maybe ;-)
H.Merijn Brand (procura
Honored Contributor

Re: How to know which process is bound to a port

lsof is indeed the way to go.
Shame it's not installed by default.

For recent OS versions get it here:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.78/

For the older versions, you can try on my site:
http://mirrors.develooper.com/hpux/downloads.html

Be SURE to pick the correct version, otherwise it will either not run at all, or give the wrong results. When all fails, build from source.

ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Fat Scrape
Honored Contributor

Re: How to know which process is bound to a port

Hi Enrico,

in this form:

[46][protocol][@hostname|hostaddr][:service|port]

see lsof man page

Fat
whiteknight
Honored Contributor

Re: How to know which process is bound to a port

Enrico,

port=5555
# lsof -i TCP:5555
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
inetd 868 root 33u IPv4 0x4b387e80 0t0 TCP *:omni (LISTEN)
#
WK
Problem never ends, you must know how to fix it