Linux--proc目录下各个文件

proc顶层目录下 例如 /proc/21571/task

/proc/[pid]/fd 是一个目录,包含进程打开文件的情况。举例如下:

$ ls -lt /proc/2406/fd

lrwx------ 1 root root 64 Dec 24 09:39 77 -> socket:[44377722]
lrwx------ 1 root root 64 Dec 17 15:07 47 -> socket:[29482617]
lr-x------ 1 root root 64 Dec 12 20:18 0 -> pipe:[13282]
l-wx------ 1 root root 64 Dec 12 20:18 1 -> pipe:[13283]
lrwx------ 1 root root 64 Dec 12 20:18 10 -> socket:[12238218]
lrwx------ 1 root root 64 Dec 12 20:18 4 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 Dec 12 20:18 40 -> socket:[19378614]
task:
进程包含的线程,子目录名是线程的ID

posted on 2020-12-31 12:04  MaXianZhe  阅读(151)  评论(0编辑  收藏  举报

导航