lsof plugin: Added the device column to complete the inode information. An inode number is specific to the filesystem/device it belongs to.
lsof/sockstat plugins: Add threads support.
Threads may or may not share the file descriptor table with the thread group leader, depending on whether the CLONE_FILES flag is included in the clone() syscall.
Also, once started, a thread can unshare the fd table with its parent. Refer to the unshare() libc syscall wrapper man page, unshare(2).
Additionally, note that the Linux lsof command in user space includes thread listings by default as well.
Now, there are two columns to identify the thread group ID (PID) and the task/thread ID (TID).
Added inode getters from both, the dentry and file structs. From kernels +3.9 the file struct caches the inode pointer. So, when possible, we get this value.
This PR includes:
device
column to complete the inode information. An inode number is specific to the filesystem/device it belongs to.CLONE_FILES
flag is included in theclone()
syscall.unshare(2)
.Linux lsof command
in user space includes thread listings by default as well.