How can i match each /proc/net/tcp entry to each opened socket?

Take the inode number (in this case, 507218). Each open file descriptor to that socket (there may be multiple file descriptors for the same socket) will appear as a link of the form:

/proc/<PID>/fd/<N> -> socket[507218]

(where <PID> is the process ID and <N> is the file descriptor).

Leave a Comment