what are differences between number of open_files and number of file_descriptors in linux ? I'm confused . The value in the /proc/sys/fs/file-max is for total file_descriptors or total open_files ? and in overall how can I calculate the total number of open_files for one pid and also total number of open_files in whole system ?
example : for mysqld proccess :
[root@agent]# lsof -p $(pidof mariadbd) | awk '{print $9}' | sort | uniq | wc -l
75
[root@agent]# ll /proc/$(pidof mariadbd)/fd | wc -l
39
as you can see two values are different . why ?