To better understanding of the file management in Linux kernel I want to find out three table declarations in the source:
- a single process file descriptor table
- system-wide table of open files
- inode table
At this moment I have found only a single process file table, which is declared in include/linux/fdtable.h and used inside the process's structure
task_struct: include/linux/sched.hFrom Wikipedia File descriptor:
Is there a way to look in the content of system-wide table of open files from the user space? The single process file descriptor table can be viewed by
ls -l /proc/PID/fdcommand for example.
Asked
Active
Viewed 882 times
3
MiniMax
- 4,025
- 1
- 17
- 32
-
_You should only ask practical, answerable questions based on actual problems that you face. Chatty, open-ended questions diminish the usefulness of our site and push other questions off the front page_, according to https://unix.stackexchange.com/help/dont-ask – K7AAY May 19 '20 at 21:30
-
3@K7AAY Both questions are practical and answerable, so I don't understand your complaint. The first question I partially answered by myself, the second is needed to trace how the system stores **ptm (pseudo-terminal master) devices** for example, because in **per process table** they all have the same path and inode. – MiniMax May 19 '20 at 21:51
