Vi.*_*Vi. 9 linux files virtual-memory
$ cat /proc/meminfo | grep Dirty
Dirty: 2396 kB
Run Code Online (Sandbox Code Playgroud)
我如何查看那些 599 个脏页位于哪些文件(至少作为一个 mountid:inode 对)?
$ cat /proc/meminfo | grep Cached
Cached: 6171156 kB
Run Code Online (Sandbox Code Playgroud)
如何在不查看vmtouch整个文件系统的情况下查看缓存中的文件?
也许有一些 netlink 或 debugfs 或 /dev/kmem-reading 或任何技巧可以做到这一点?
您可能可以使用crash-utility。
特别是使用files命令
-c选项一起显示每个当前打开文件的页面缓存中的页面的详细信息。-p选项一起显示给定 inode 的页面缓存中的所有页面。