NAME

fincore - File IN CORE: show which blocks of a file are in core


SYNOPSIS

fincore [options] <-stdin | file [...]>

 Options:
  -help - brief help message
  -man - full documentation
  -summary - report summary statistics for the files
  -justsummarize - just report summary statistics for the files
  -stdin - read file names from standard input


OPTIONS

-help
Shows usage information and exits.

-man
Shows the manual page and exits.

-summary
Report summary statistics for the files.

-nosummary
Don't report summary statistics for the files. This is the default.

-justsummarize
Just report summary statistics for the files. I.e. don't show details for each file.

-nojustsummarize
Don't just report summary statistics for the files. This is the default.

-stdin
Read file names from standard input. This is to avoid ``Arg list too long'' with very many files.


DESCRIPTION

fincore is a command that shows which pages (blocks) of a file are in core memory.

It is particularly useful for determining the contents of the buffer-cache. The name means ``File IN CORE'' and I pronounce it ``eff in core''.


EXAMPLES

 $ fincore foo.rrd
 foo.rrd: no incore pages.
 $ cat foo.rrd >/dev/null # read the whole file
 $ fincore foo.rrd
 foo.rrd: 26 incore pages: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 $ ls |grep '\.rrd$' |~/perl/fincore --stdin --justsummarize
 page size: 4096 bytes
 2214049 pages, 8.4 Gbytes in core for 268994 files; 8.23 pages, 32.9 kbytes per file.


BUGS

In verbose mode, you may get an error from mincore such as ``cannot allocate memory'' if the file size is zero.

Some operating systems have posix_fadvise, but it doesn't work. For instance under Linux 2.4, you may see this error:

 posix_fadvise: Inappropriate ioctl for device


AUTHOR

Dave Plonka <plonka@cs.wisc.edu>

Copyright (C) 2007 Dave Plonka. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.


VERSION

This is fincore $Revision: 1.9 $.


SEE ALSO

The fadvise command.