Socket connections/ports attached to a process?

Sometimes we require information about the message to where it has being sending.And the status of that socket connection.

We can use prstat and netstat along with pfiles command to explore further.

On Solaris 10-OS:


First we do process stat using prstat to get PID of desired process.and then using pfiles we can get all socket details connected with that PID.

#pfiles PID

Now we can use netstat command to know more about that socket connection what does it doing and it have local/destination machines.
With 'pfiles PID' command results ,we get sockname and peername details with port number.

sockname: AF_INET 127.0.0.1 port: 63077
peername: AF_INET 127.0.0.1 port: 9359

Now use netstat command
# netstat -an|egrep "63077|9359"



No comments :

Post a Comment