1836534 Members
4324 Online
110102 Solutions
New Discussion

port useage hpux 11i

 
SOLVED
Go to solution
Donald Thaler
Super Advisor

port useage hpux 11i

i'm trying to find what application is using a specific port. I see references to a command 'lsof' but this command doesn't work on my hp ux11i box(pa risc 64). I tried the netstat -an|grep 3938 but that just told me it was in use.
3 REPLIES 3
James A. Donovan
Honored Contributor
Solution

Re: port useage hpux 11i

You can try downloading the source code for lsof and/or a copy of the pre-compiled binary from here:

http://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/
Remember, wherever you go, there you are...
John Dvorchak
Honored Contributor

Re: port useage hpux 11i

when you say "it doesn't work" do you mean you can't find it? You might try this link and download the binary, unzip it, and put in in your path like /usr/sbin or /usr/local/sbin.

http://ftp.br.xemacs.org/pub/unix-tools/lsof/binaries/hpux/
If it has wheels or a skirt, you can't afford it.
Sandman!
Honored Contributor

Re: port useage hpux 11i

Hi Donald,

netstat -an will give you the port usage also, however it could be listing a port on a remote system also. You need to be specific on your filtering criteria i.e.

# netstat -an | awk '{if(z[split($4,z,".")]==3938) print $0}'

...the awk construct splits $4 (Local Address) and compares the port no. to the last split-field. Or use lsof, downloading it from http://hpux.cs.utah.edu/, as:

# lsof -i:3938

the benefit of lsof is that it gives the process that's listening/bound to that port.

hope it helps!