How to see number of open file handles per process?

Most active processes use one or more file descriptors. These descriptors are an internal representation to the kernel of an opened file. Also opened sockets for network connections are counted as opened files. To see the correct number of opened files per process, we can leverage the /proc file system to provide this information.

Examples

find /proc/12345/fd -type l | wc -l

Sample output

7

Recently updated at Sept. 27, 2019

Do you like this page? Share it with others or help us make it better

Yes!

Share with friends:
Share on Twitter