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.
|