.SH NAME
/proc/pid/fdinfo/ \- information about file descriptors
.SH DESCRIPTION
-.TP
-.IR /proc/ pid /fdinfo/ " (since Linux 2.6.22)"
This is a subdirectory containing one entry for each file which the
process has open, named by its file descriptor.
The files in this directory are readable only by the owner of the process.
about the corresponding file descriptor.
The content depends on the type of file referred to by the
corresponding file descriptor.
-.IP
+.P
For regular files and directories, we see something like:
-.IP
+.P
.in +4n
.EX
.RB "$" " cat /proc/12015/fdinfo/4"
mnt_id: 21
.EE
.in
-.IP
+.P
The fields are as follows:
-.RS
.TP
.I pos
This is a decimal number showing the file offset.
at the time the file was opened,
rather than the current setting of the close-on-exec flag.
.TP
-.I
.I mnt_id
This field, present since Linux 3.15,
.\" commit 49d063cb353265c3af701bab215ac438ca7df36d
is the ID of the mount containing this file.
See the description of
.IR /proc/ pid /mountinfo .
-.RE
-.IP
+.P
For eventfd file descriptors (see
.BR eventfd (2)),
we see (since Linux 3.8)
.\" commit cbac5542d48127b546a23d816380a7926eee1c25
the following fields:
-.IP
+.P
.in +4n
.EX
pos: 0
eventfd\-count: 40
.EE
.in
-.IP
+.P
.I eventfd\-count
is the current value of the eventfd counter, in hexadecimal.
-.IP
+.P
For epoll file descriptors (see
.BR epoll (7)),
we see (since Linux 3.8)
.\" commit 138d22b58696c506799f8de759804083ff9effae
the following fields:
-.IP
+.P
.in +4n
.EX
pos: 0
tfd: 7 events: 19 data: 74253d2500000007
.EE
.in
-.IP
+.P
Each of the lines beginning
.I tfd
describes one of the file descriptors being monitored via
The
.I data
field is the data value associated with this file descriptor.
-.IP
+.P
For signalfd file descriptors (see
.BR signalfd (2)),
we see (since Linux 3.8)
.\" commit 138d22b58696c506799f8de759804083ff9effae
the following fields:
-.IP
+.P
.in +4n
.EX
pos: 0
sigmask: 0000000000000006
.EE
.in
-.IP
+.P
.I sigmask
is the hexadecimal mask of signals that are accepted via this
signalfd file descriptor.
.BR SIGQUIT ;
see
.BR signal (7).)
-.IP
+.P
For inotify file descriptors (see
.BR inotify (7)),
we see (since Linux 3.8)
the following fields:
-.IP
+.P
.in +4n
.EX
pos: 0
inotify wd:1 ino:192627 sdev:800001 mask:800afff ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:27261900802dfd73
.EE
.in
-.IP
+.P
Each of the lines beginning with "inotify" displays information about
one file or directory that is being monitored.
The fields in this line are as follows:
-.RS
.TP
.I wd
A watch descriptor number (in decimal).
.TP
.I mask
The mask of events being monitored for the target file (in hexadecimal).
-.RE
-.IP
+.P
If the kernel was built with exportfs support, the path to the target
file is exposed as a file handle, via three hexadecimal fields:
.IR fhandle\-bytes ,
.IR fhandle\-type ,
and
.IR f_handle .
-.IP
+.P
For fanotify file descriptors (see
.BR fanotify (7)),
we see (since Linux 3.8)
the following fields:
-.IP
+.P
.in +4n
.EX
pos: 0
fanotify ino:19264f sdev:800001 mflags:0 mask:1 ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:4f261900a82dfd73
.EE
.in
-.IP
+.P
The fourth line displays information defined when the fanotify group
was created via
.BR fanotify_init (2):
-.RS
.TP
.I flags
The
argument given to
.BR fanotify_init (2)
(expressed in hexadecimal).
-.RE
-.IP
+.P
Each additional line shown in the file contains information
about one of the marks in the fanotify group.
Most of these fields are as for inotify, except:
-.RS
.TP
.I mflags
The flags associated with the mark
.I ignored_mask
The mask of events that are ignored for this mark
(expressed in hexadecimal).
-.RE
-.IP
+.P
For details on these fields, see
.BR fanotify_mark (2).
-.IP
+.P
For timerfd file descriptors (see
.BR timerfd (2)),
we see (since Linux 3.17)
.\" commit af9c4957cf212ad9cf0bee34c95cb11de5426e85
the following fields:
-.IP
+.P
.in +4n
.EX
pos: 0
it_interval: (0, 0)
.EE
.in
-.RS
.TP
.I clockid
This is the numeric value of the clock ID
fields contain the values that
.BR timerfd_gettime (2)
on this file descriptor would return.)
-.RE
+.SH HISTORY
+Linux 2.6.22.
.SH SEE ALSO
.BR proc (5)