-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
60 lines (44 loc) · 1.72 KB
/
README
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
fincore
=======
A utility for determining whether a file is in the kernel's buffer cache.
This simple program iterates over a list of files and calls mmap() and then
mincore() for each disk block of a file. It reports whether the blocks are in
the kernel's page buffer cache.
This is a fully C implementation of David Plonka's fincore work, available at
http://net.doit.wisc.edu/~plonka/fincore/
Quickstart
==========
Let's look at a large file (i760User.pdf). 87% of this file is in the buffer
cache. There are a total of 67770 pages.
$ fincore i760User.pdf
File Size Pages Percent
i760User.pdf 67770 59167 0.87
Let's look at netstat-trace.txt and see WHICH pages (blocks) are in the buffer
cache. See that the first 8 pages of the 162 block file are in core.
$ fincore -v netstat-trace.txt
File Size Pages Percent Details
netstat-trace.txt 162 8 0.05 0 1 2 3 4 5 6 7
Let's get a report on all .txt files in the current directory to see what
subset of them are in core.
$ fincore -S *.txt
Total files: 121
Total pages: 2344
Total in core:16
Building
========
The autotools are used for building the package.
./configure && make
If you have an RPM-based system, you should also be able to build an RPM of
the package straight from the tarball:
rpmbuild -ta fincore-0.11.tar.gz
Credits
=======
The idea for this project derives from David Plonka's utility. Almost all of
the code involved in the main loop of the program is unchanged from the
Inline::C code used by the perl implementation.
Martin A. Brown <martin@linux-ip.net>
- primary contact for this utility
Dave Plonka <plonka@cs.wisc.edu>
- perl implementation, using Inline::C
Nathan Burnett <ncb@cs.wisc.edu>
- unreleased prior work