how to find the owner PID of open socket on Solaris9?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to find the owner PID of open socket on Solaris9?
# 1  
Old 12-11-2007
Question how to find the owner PID of open socket on Solaris9?

Hi all,
I am trying to connect the open socket and its owner PID on my Solaris9 system. But it seems not very easy.

As netstat is not as powerful as it is on Linux platform, without the "-program" option, and "lsof -i <UDP|TCP>@<hostIP>" won't show the one i want although it lists some idle and some .

Could you please suggest which tool shall i work with on this issue. Below is the one that i want to get:
# netstat -an | grep 161
*.161 Idle

Thanks in advance
# 2  
Old 12-11-2007
Hi,

/usr/bin/pcred [pid | core]
will give you the credentials of each PID, also have a look at /usr/bin/pwdx as it will give you the working directory of the PID, if you need more have a look at the man page for any of the above.

Mike.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

How to easily identify socket given a PID on Linux?

I have the PID of a process running on Linux mymac 2.6.18-417.el5 #1 SMP Sat Nov 19 14:54:59 EST 2016 x86_64 x86_64 x86_64 GNU/Linux I need to get the ip & port i.e socket details of the given PID (32752). Based on a suggestion on my other thread i tried bash-3.2$ netstat -anpt | grep... (8 Replies)
Discussion started by: mohtashims
8 Replies

2. Shell Programming and Scripting

Closing open file descriptors from /proc/pid/fd

Hi guys, i need to write a shell script that will close file descriptors from /proc/pid/fd will calling exec 4<&- solve the problem ? thanks in advance :) (15 Replies)
Discussion started by: alpha_romeo
15 Replies

3. UNIX for Advanced & Expert Users

command to find the owner of a db

Hi, Im working with an Informix db, i would like to know the command to identify the owner of a particular database Thanks (2 Replies)
Discussion started by: dvah
2 Replies

4. Programming

open a socket

hi all, i meet a problem when opening a socket, is that when the remote host not available or its port hanged ,my program still suspending untill i cancel the operation... but when the host is ok ,my program work ok. i handled in my code all these exceptions ,but my problem is when the host is... (6 Replies)
Discussion started by: Ahmed waheed
6 Replies

5. Shell Programming and Scripting

find files by OWNER

i have written a script in which i have to go to a dir and search there for files belonging to owner pipe and then delete them Can anyone tell me how to find files by owner pipe. below some of the files belonging to owner pipe -rw------- 1 pipe pipe 163840 Mar 18 2008 ... (7 Replies)
Discussion started by: ali560045
7 Replies

6. UNIX for Dummies Questions & Answers

Find files by owner

Hello, I have a problem, I need to find files in folder by owner, not using find command at all and ls -R parameter. Thanx a lot. Best regarts (1 Reply)
Discussion started by: Boliakas
1 Replies

7. UNIX for Dummies Questions & Answers

open a socket on a server

Hello, I want to test a firewall rule between 2 servers A & B. I need a command that will open a socket on the server A such as: themagiccommand MyPort And on the client server B, i will run the command telnet IP_serverA Myport Can you help me ? Thank you Gunther (0 Replies)
Discussion started by: gunbol
0 Replies

8. Cybersecurity

Getting PID of Open Connectivity

Hi! I've a Java socket server program that is listening for requests, and using netstat, I can see that the connection is already open. However as the process name (from ps -ef) is very long and I can't grep the program name. Can anyone advise how I find out the PID of the process? Can... (5 Replies)
Discussion started by: swing
5 Replies

9. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

10. UNIX for Dummies Questions & Answers

Which application has a TCP socket open

If I do a netstat -a I can see all the sockets currently open, is there a way that I can tell which application is holding open these sockets ? (3 Replies)
Discussion started by: murphyboy
3 Replies
Login or Register to Ask a Question