Find original owning process of a Linux socket
Posted
by Rob H
on Stack Overflow
See other posts from Stack Overflow
or by Rob H
Published on 2010-03-01T19:37:31Z
Indexed on
2010/04/06
6:13 UTC
Read the original article
Hit count: 138
In Linux and other UNIX-like operating systems, it is possible for two (or more) processes to share an Internet socket. Assuming there is no parent-child relationship between the processes, is there any way to tell what process originally created a socket?
Clarification: I need to determine this from "outside" the processes using the /proc
filesystem or similar. I can't modify the code of the processes. I can already tell what processes are sharing sockets by reading /proc/<pid>/fd
, but that doesn't tell me what process originally created them.
© Stack Overflow or respective owner