Skip to content
Advertisement

how do I find out what program’s on the other end of a local socket?

A process on my Linux system, strace tells me, is talking on a socket which has file descriptor 10. lsof tells me that this is a unix socket with inode 11085, and netstat further tells me that inode 11085 a stream socket, and that it’s connected.

Given that this process doesn’t have any other threads, there must therefore be another process on the system that’s connected to the other end of this socket. How do I find out what it is?

Update:

There’s some illumination from the lsof author here. Essentially, it seems that Linux just doesn’t provide this information.

Advertisement

Answer

ss -p

will tell. (Provided the socket is not owned by the kernel itself.)

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement