Find How Many Files are Open and How Many Allowed in LinuxJanuary 22, 2008 at 8:14 pm | Posted in Uncategorized | Leave a comment
To find how many files are opne at any given time you can type this on the terminal: cat /proc/sys/fs/file-nrI got this number:
6240 ( total allocated file descriptors since boot)
0 ( total free allocated file descriptors)
94297 ( maximum open file descriptors)
Not that you can check the maximum open file by using this command: cat /proc/sys/fs/file-max
And change the max to your own like with this command: echo “804854″ > /proc/sys/fs/file-max
You can use lsof command to also check for the number of files currently open ( lsof | wc -l ), but this takes into account open files that are not using file descriptors such as directories, memory mapped files, and executable text files, and will actually show higher numbers than previous method.