On Mon, 17 Mar 2008 17:58:34 +0900
Hasnain <[EMAIL PROTECTED]> wrote:

> Hi Everyone,
> 
> Is there anyway how to find which process is holding a tcp port in linux?
> Say for instance, i checked
> 
> netstat -a |grep ###. but i dont know which process has opened or hold that
> port currently. Is there anyway to find out this?
> 
Hi Hasnain,
A netstat -pl will show listening ports and the PID's of each entry.
Hope this helps.
example output:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp        0      0 *:smtps           :*          LISTEN 4442/master 

> Thanks in advance,
> 
> Hasnain
q
-- 
Regards
Mick Pollard ( lunix )
------------------------------------------------
BOFH Excuse of the day:
Duplicated Paging Interruption Error



Attachment: pgpGEfKiJ5Ird.pgp
Description: PGP signature

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to