Summary: Searching for a process using a given port

From: Agarkar, Rahul <>
Date: Fri May 13 2005 - 00:11:02 EDT
Thanks everybody for the overwhelming response. I got a couple of responses
which I have copied below:

1) "You need the open source utility "lsof".  The source is available from a
system at Purdue University.  Perform a search in Google, and you should
find it."

This is the one which I tried and works fine.
2) "ps -ef |awk {'print $2'} > /tmp/pid.out
for i in `cat /tmp/pid.out`

pfiles $i >> /tmp/pfiles.out

>From the output file /tmp/pfiles.out, you can use any edit utility or
whatever can view it to search/locate the port you looking for, then you
know which sockets/ports belongs to which processes."

- Rahul 

-----Original Message-----
From: Agarkar, Rahul []
Sent: Friday, May 13, 2005 9:03 AM
Subject: Searching for a process using a given port

Is there any way I can find out which process is using a given port ? For
example, if I want to find out, which process is connected to port no. 8888,
how can do this ? netstat -na gives information about the host:port
connected to the given port. It does not give any information about the
process (process name or process id) connected to this port.
- Rahul
sunmanagers mailing list
sunmanagers mailing list
Received on Fri May 13 00:11:27 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:46 EST