Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here the output of free -m:

             total       used       free     shared    buffers     cached
Mem:          7188       6894        294          0        249       5945
-/+ buffers/cache:        698       6489
Swap:            0          0          0

I can see almost 6GB(5945MB) memory out of 7GB is used in caching the files. I know how to flush the caches. My question is: Is possible see which files(or inodes) are being cached?

share|improve this question
I don't know the answer but 2 things are of interest: How do you flush the caches? Why is that of interest, I'm not implying anything here - just interested in the use case –  Server Horror Jun 8 '11 at 20:05
This flushes both the buffers and cached: sysctl -w vm.drop_caches=3. You might want to read more on it, before using. Sometimes its just needed. Its available - this should be another reason :) –  ssapkota Jun 8 '11 at 20:07
A lot of people are asking for it. There should be some reason. –  ssapkota Jun 8 '11 at 20:18
dropping caches comes handy if you want to do some I/O related performance measurements and do not want to have them "spoiled" by O/S caching –  the-wabbit Jun 9 '11 at 8:22

1 Answer 1

up vote 8 down vote accepted

Well, there is an easy way to take a look at the kernel's page cache if you happen to have ftools - "fincore" gives you some summary information on what files' pages are the content of the cache.

share|improve this answer
Thanks, I will look into it. –  ssapkota Jun 9 '11 at 8:33
This is some seriously awesome sauce. Thanks! –  Cobra_Fast Jan 22 '13 at 13:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.