Operating System - HP-UX
1832880 Members
2365 Online
110048 Solutions
New Discussion

process associated with the port number

 
SOLVED
Go to solution
SAM_24
Frequent Advisor

process associated with the port number

Hi,

How to find out process associated with the port number?

Thanks.
Never quit
4 REPLIES 4
Michael Tully
Honored Contributor
Solution

Re: process associated with the port number

Hi,

The easiest way to do this is to install 'lsof' You can obtain an already compiled version here:

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

Michael
Anyone for a Mutiny ?
Niraj Kumar Verma
Trusted Contributor

Re: process associated with the port number

hi,

lsof is "the best" to find the info.

-Niraj
Niraj.Verma@philips.com
Michael Tully
Honored Contributor

Re: process associated with the port number

Here's an example of lsof usage:

To which files are open for a given process id (pid)

# lsof -p

To see all the open files associated with a particular command.

# lsof -c midaemon

User name.

# lsof -u
# lsof -u

processes being used via a socket.

# lsof -i tcp:23
# lsof -i udp:123

Michael
Anyone for a Mutiny ?
V. V. Ravi Kumar_1
Respected Contributor

Re: process associated with the port number

hi

lsof is the best command to use. for example to find processes associated with the port number 1521 (oracle port) issue

lsof -i:1521

for telnet (23)

lsof -i:23

iam attaching lsof binary, u unshar it and u can use it if the OS is 11.00
regds
ravi
Never Say No