{
    "mode": "man",
    "parameter": "proc_pid_fdinfo",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/proc_pid_fdinfo/5/json",
    "generated": "2026-10-08T07:31:16Z",
    "sections": {
        "NAME": {
            "content": "/proc/pid/fdinfo/ - information about file descriptors\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "/proc/pid/fdinfo/ (since Linux 2.6.22)\nThis  is a subdirectory containing one entry for each file which the process has open,\nnamed by its file descriptor.  The files in this directory are readable  only  by  the\nowner  of  the  process.   The contents of each file can be read to obtain information\nabout the corresponding file descriptor.  The content depends on the type of file  re‐\nferred to by the corresponding file descriptor.\n\nFor regular files and directories, we see something like:\n\n$ cat /proc/12015/fdinfo/4\npos:    1000\nflags:  01002002\nmntid: 21\n\nThe fields are as follows:\n\npos    This is a decimal number showing the file offset.\n\nflags  This  is  an  octal  number  that displays the file access mode and file status\nflags (see open(2)).  If the close-on-exec file descriptor flag  is  set,  then\nflags will also include the value OCLOEXEC.\n\nBefore  Linux 3.1, this field incorrectly displayed the setting of OCLOEXEC at\nthe time the file was opened, rather than the current setting of the  close-on-\nexec flag.\n\nmntid This  field,  present  since Linux 3.15, is the ID of the mount containing this\nfile.  See the description of /proc/pid/mountinfo.\n\nFor eventfd file descriptors (see eventfd(2)), we see (since Linux 3.8) the  following\nfields:\n\npos: 0\nflags:    02\nmntid:   10\neventfd-count:               40\n\neventfd-count is the current value of the eventfd counter, in hexadecimal.\n\nFor  epoll  file  descriptors  (see  epoll(7)), we see (since Linux 3.8) the following\nfields:\n\npos: 0\nflags:    02\nmntid:   10\ntfd:        9 events:       19 data: 74253d2500000009\ntfd:        7 events:       19 data: 74253d2500000007\n\nEach of the lines beginning tfd describes one of the file descriptors being  monitored\nvia  the  epoll file descriptor (see epollctl(2) for some details).  The tfd field is\nthe number of the file descriptor.  The events field is  a  hexadecimal  mask  of  the\nevents being monitored for this file descriptor.  The data field is the data value as‐\nsociated with this file descriptor.\n\nFor  signalfd file descriptors (see signalfd(2)), we see (since Linux 3.8) the follow‐\ning fields:\n\npos: 0\nflags:    02\nmntid:   10\nsigmask:  0000000000000006\n\nsigmask is the hexadecimal mask of signals that are accepted via  this  signalfd  file\ndescriptor.  (In this example, bits 2 and 3 are set, corresponding to the signals SIG‐\nINT and SIGQUIT; see signal(7).)\n\nFor  inotify file descriptors (see inotify(7)), we see (since Linux 3.8) the following\nfields:\n\npos: 0\nflags:    00\nmntid:   11\ninotify wd:2 ino:7ef82a sdev:800001 mask:800afff ignoredmask:0 fhandle-bytes:8 fhandle-type:1 fhandle:2af87e00220ffd73\ninotify wd:1 ino:192627 sdev:800001 mask:800afff ignoredmask:0 fhandle-bytes:8 fhandle-type:1 fhandle:27261900802dfd73\n\nEach of the lines beginning with \"inotify\" displays information about one file or  di‐\nrectory that is being monitored.  The fields in this line are as follows:\n\nwd     A watch descriptor number (in decimal).\n\nino    The inode number of the target file (in hexadecimal).\n\nsdev   The ID of the device where the target file resides (in hexadecimal).\n\nmask   The mask of events being monitored for the target file (in hexadecimal).\n\nIf  the kernel was built with exportfs support, the path to the target file is exposed\nas a file handle, via  three  hexadecimal  fields:  fhandle-bytes,  fhandle-type,  and\nfhandle.\n\nFor  fanotify file descriptors (see fanotify(7)), we see (since Linux 3.8) the follow‐\ning fields:\n\npos: 0\nflags:    02\nmntid:   11\nfanotify flags:0 event-flags:88002\nfanotify ino:19264f sdev:800001 mflags:0 mask:1 ignoredmask:0 fhandle-bytes:8 fhandle-type:1 fhandle:4f261900a82dfd73\n\nThe fourth line displays information defined when the fanotify group was  created  via\nfanotifyinit(2):\n\nflags  The flags argument given to fanotifyinit(2) (expressed in hexadecimal).\n\nevent-flags\nThe  eventfflags  argument  given to fanotifyinit(2) (expressed in hexadeci‐\nmal).\n\nEach additional line shown in the file contains information about one of the marks  in\nthe fanotify group.  Most of these fields are as for inotify, except:\n\nmflags The flags associated with the mark (expressed in hexadecimal).\n\nmask   The events mask for this mark (expressed in hexadecimal).\n\nignoredmask\nThe mask of events that are ignored for this mark (expressed in hexadecimal).\n\nFor details on these fields, see fanotifymark(2).\n\nFor timerfd file descriptors (see timerfd(2)), we see (since Linux 3.17) the following\nfields:\n\npos:    0\nflags:  02004002\nmntid: 13\nclockid: 0\nticks: 0\nsettime flags: 03\nitvalue: (7695568592, 640020877)\nitinterval: (0, 0)\n\nclockid\nThis  is the numeric value of the clock ID (corresponding to one of the CLOCK*\nconstants defined via <time.h>) that is used to mark the progress of the  timer\n(in this example, 0 is CLOCKREALTIME).\n\nticks  This  is  the  number of timer expirations that have occurred, (i.e., the value\nthat read(2) on it would return).\n\nsettime flags\nThis field lists  the  flags  with  which  the  timerfd  was  last  armed  (see\ntimerfdsettime(2)),  in  octal  (in  this  example, both TFDTIMERABSTIME and\nTFDTIMERCANCELONSET are set).\n\nitvalue\nThis field contains the amount of time until the timer will  next  expire,  ex‐\npressed  in  seconds  and  nanoseconds.  This is always expressed as a relative\nvalue, regardless of whether the timer was created using the  TFDTIMERABSTIME\nflag.\n\nitinterval\nThis  field  contains  the  interval  of the timer, in seconds and nanoseconds.\n(The itvalue and itinterval fields contain the values that timerfdgettime(2)\non this file descriptor would return.)\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "proc(5)\n\nLinux man-pages 6.7                          2023-08-15                           procpidfdinfo(5)",
            "subsections": []
        }
    },
    "summary": "/proc/pid/fdinfo/ - information about file descriptors",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "proc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
        }
    ]
}