LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How many files are opened by the Kernel ? (https://www.linuxquestions.org/questions/linux-server-73/how-many-files-are-opened-by-the-kernel-903412/)

haux 09-16-2011 02:12 PM

How many files are opened by the Kernel ?
 
Hi,

Where can I find in /proc the number of opened files actually (not how to set the maximum :) )

Thanks

druuna 09-16-2011 02:58 PM

Hi,

Code:

[root@srv-4 proc]# cat /proc/sys/fs/file-nr
3391    969    52427
|        |      |
|        |      |
|        |      maximum open file descriptors
|        total free allocated file descriptors
total allocated file descriptors
(the number of file descriptors allocated since boot)

Have a look here: GNU/Linux - How Many Open Files?

Do read the What is an open file? part. Maybe you are looking for lsof | wc -l as mentioned in the article.

Hope this helps.

salasi 09-18-2011 02:18 PM

It is somewhat unclear what the OP means - the distinction between the number of files that the kernel has open at one time, and the number of files that the kernel has had open, presumably since it has been booted, would lead to a difference.

I can only really see a sensible reason to know the number of files that the kernel has open at one time (and that one time to be now), but it is always best to be prepared to be surprised.


All times are GMT -5. The time now is 05:12 AM.