On Tue, Mar 07, 2017 at 11:33:48AM +0900, Masatake YAMATO wrote: > This patch set proposes adding fincore command to util-linux > distribution. The command counts pages of file contents being > resident in memory(in core), and reports the numbers. > > It helps system administrators understand how their systems use > physical memory, especially about page caches when they have to do > trouble shooting and/or performance tuning. > > This is just my case. A person in other role may also get benefits > from this command. Not sure if I like the format ;-) $ fincore /etc/fstab /bin/emacs 1 1544 /etc/fstab 4156 17163144 /bin/emacs Why we need file size there? Would be better to use filename as the first column? $ fincore /etc/fstab /bin/emacs /etc/fstab 1 /bin/emacs 4156 it would be also nice have a way how to print only the number if only one file specified. Then you can use it in scripts without awk (or so), just: FILEPAGES=$(fincore /bin/emacs) Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html