Operating System - HP-UX
1833780 Members
2142 Online
110063 Solutions
New Discussion

find out the what process holding the port

 
SOLVED
Go to solution
kholikt
Super Advisor

find out the what process holding the port

Hi,

I have one software using one of the high port 7546. Occasiionaly the software will hung but port 7546 still some how occupy. Is there any way I can find out in command line which process holding the 7546 port.
abc
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: find out the what process holding the port

If you haven't installed it, one of the best tools to put in your toolbox is lsof (list open files); it will do what you want and much, much more. Get it from here:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.77/

The standard utility is netstat. netstat -a will display the ports in use and the processes associated with them.
If it ain't broke, I can fix that.
Mel Burslan
Honored Contributor

Re: find out the what process holding the port

if it is not installed on your system, you will need to install the utility called lsof which will help you with this.

lsof -i tcp:7546
or in a rougher way
lsof | grep 7546 (may turn out a little more than port 7546)

should show you which pid is holding the port open.

lsof can be obtained from

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

if you need it

hope this helps
________________________________
UNIX because I majored in cryptology...
Chauhan Amit
Respected Contributor

Re: find out the what process holding the port

Check out this thread for:
lsof binary for hpux 11.23 64bit PARISC

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=861484

lsof for hpux 11.00 64-bit

http://the-other.wiretapped.net/security/host-security/lsof/binaries/hpux/B.11.00/64/9000_785/


-Amit
If you are not a part of solution , then you are a part of problem