Get files that are in cache
Hi,
Short story : I would like to get all the files that are currently loaded in the cache/buffer. Anyone know a tool to do it ?? Long story : my filesystem is an ext4 fs, with the kernel 3.4.6 I'm trying to preload files (with simple "cat files > /dev/null") in order to have better disk spin down. I tried to trace down opened files by my usual program with "strace -ff" and "lsof" but some files are still missing. To test, I run "sync; echo 3 > /proc/sys/vm/drop_caches", preload files, follow read event in /proc/kmsg. So now I want to drop_caches, wait my system to stabilize, run my program, get all files in cache > those are files to be preload Thanks in advance. |
Quote:
* BTW could you please update your profile? It still lists your distribution as "Fedora 7" and I sure hope you're not running that but the current release. |
If you are talking about the kernel readahead feature : it's not adapted for what I want. readahead load big file entirely (depend on your threshold) instead of part of it only when there is an open file request. That don't work to pre-load files that you know that is goiing to be open later but are not opened yet.
About files in cache, I found a tool set linux-ftools : http://code.google.com/p/linux-ftools/ It can say if a specific file is cached (and more) or not. So to know all files that are in cache with this tool, you will have to scan through all files in your system :-( I hope that there is more adapted tool ... |
Quote:
|
All times are GMT -5. The time now is 09:09 AM. |