on our linux rhel servers fs.file-max
set with 100000
sysctl -p | grep fs.file-max
fs.file-max = 100000
from my understanding the file-max kernel parameter refers to open file descriptors, and file-nr gives us the current number of open file descriptors. But lsof lists all open files, including files which are not using file descriptors – such as current working directories, memory mapped library files, and executable text files.
so back to my question
dose the following lsof , really good indication that we reached the fs.file-max value?
lsof | wc -l
OR
[[ ` lsof | wc -l ` -gt 100000 ]] && echo "please increase the fs.file-max"