Unix administration - which process opens a TCP/IP port?

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > which process opens a TCP/IP port?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author which process opens a TCP/IP port?
Jaguk Ku

2004-01-23, 4:53 pm

Hi there,

I would like to know which process opens TCP/IP port 10100. and who is the
owner of the process.

The machine is Sun E450, solaris 8.

when i execute command netstat, the output is below

[dbm@dbm /user/dbm]$netstat -na | grep 10100
*.10100 *.* 0 0 24576 0 LISTEN
203.239.148.41.10100 203.239.148.41.65294 32768 0 32768 0
CLOSE_WAIT
203.239.148.41.10100 203.239.148.41.65341 32768 0 32714 0
CLOSE_WAIT
203.239.148.41.10100 203.239.148.41.65345 32768 0 32714 0
CLOSE_WAIT
[dbm@dbm /user/dbm]$

Thanks in advance

Jaguk Ku


Davide Bianchi

2004-01-23, 4:53 pm

Jaguk Ku <jkku@kynax.com> wrote:
quote:

> I would like to know which process opens TCP/IP port 10100. and who is the
> owner of the process.



lsof will tell you.
man lsof for more info

Davide
Christoph Schuch

2004-01-23, 4:53 pm

**** Post for FREE via your newsreader at post.usenet.com ****
quote:

> lsof will tell you.
> man lsof for more info



if lsof is not installed you can use

bash# list=`ps -e -o pid` ; for item in $list ; do pfiles $item | grep port
| grep 10100 && echo $item ; done

to get the pid of the process.

Christoph




-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Bill Marcum

2004-01-23, 4:53 pm

On Tue, 11 Nov 2003 14:20:12 +0900, Jaguk Ku
<jkku@kynax.com> wrote:
quote:

> Hi there,
>
> I would like to know which process opens TCP/IP port 10100. and who is the
> owner of the process.
>
> The machine is Sun E450, solaris 8.
>
> when i execute command netstat, the output is below
>
> [dbm@dbm /user/dbm]$netstat -na | grep 10100
> *.10100 *.* 0 0 24576 0 LISTEN
> 203.239.148.41.10100 203.239.148.41.65294 32768 0 32768 0
> CLOSE_WAIT
> 203.239.148.41.10100 203.239.148.41.65341 32768 0 32714 0
> CLOSE_WAIT
> 203.239.148.41.10100 203.239.148.41.65345 32768 0 32714 0
> CLOSE_WAIT
> [dbm@dbm /user/dbm]$
>


netstat -np
--
You can go anywhere you want if you look serious and carry a clipboard.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com