SUMMARY: How to determine what app/program is using a spcific TCP or UDP p ort.

From: Loris Serena (Loris.Serena@esat.com)
Date: Mon Feb 21 2005 - 06:48:09 EST


Thanks to Casper Dik, Vince Merrell, Neil Quiogue and David Flores

pfiles is the way to go.

Now if you want to know what port a process is using, just go with

pfiles <PID> | grep port.

If what you want (as I did) is to find out what process is using a specific
port (i.e. 8003),
all I could come up with is this:

for i in `ps -ef | awk '{print $2}'`
do
    if (pfiles $i | grep 8003); then
        echo "Process $i is using port $1"
    fi
done

If you know/can think of/find anything smarter or less ugly than the above,
please feel free to send it to me ;-)

Cheers

Loris

-----Original Message-----
From: Loris Serena
Sent: 21 February 2005 10:23
To: 'sunmanagers@sunmanagers.org'
Subject: How to determine what app/program is using a spcific TCP or UDP p
ort.

Hello Folks,

Is there a way with the native Solaris 9 commands (i.e. NOT lsof) to
determine what application/program is using a specific TCP or UDP port(s).

TIA

Loris

Esat Telecommunications Limited
is a wholly owned subsidiary of BT Group plc
Registered in Ireland, Registration No. 141524
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland

This electronic message contains information (and may contain files) from
Esat Telecommunications Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.esatbt.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers

Esat Telecommunications Limited
is a wholly owned subsidiary of BT Group plc
Registered in Ireland, Registration No. 141524
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland

This electronic message contains information (and may contain files) from
Esat Telecommunications Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.esatbt.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:12 EDT