> cat /proc/sys/fs/file-max
13032310
> cat /proc/sys/fs/file-nr
25696 0 13032310
> cat /proc/3898/limits | grep "open files"
Max open files 1024 4096 files
// can also use ulimit
> ulimit -Hn // hard limit
4096
> ulimit -Sn // soft limit
1024
// number of file descriptors in use
ls /proc/3898/fd/ | wc -l
6
Sometimes you tune the parameter per process using sysctl. That is normal because some process are expecting to use more file descriptors.
// conf
[Service]
LimitNOFILE=65536
cat /proc/5054/limits | grep "open files"
Max open files 65536 65536 files