If I have no permission to use lsof, how do I get them for a process with pid already known? Thanks
I know netstat -l -p
command print out active unix domain sockets, but it seems it's not updating ? after I closed the socket, it still shows up in netstat command result.
Best Answer
On Linux you can look through the
/proc
filesystem specifically for a given PID under/proc/<pid>/fd
. All the file descriptors (fd) are listed there per process.Example
Everything listed there as
socket:[....]
is a socket.