1cachestat(8)                System Manager's Manual               cachestat(8)
2
3
4

NAME

6       cachestat - Statistics for linux page cache hit/miss ratios. Uses Linux
7       eBPF/bcc.
8

SYNOPSIS

10       cachestat [-T] [interval [count]]
11

DESCRIPTION

13       This traces four kernel functions and prints per-second summaries. This
14       can  be  useful  for general workload characterization, and looking for
15       patterns in operation usage over time.
16
17       This works by tracing kernel page cache functions using  dynamic  trac‐
18       ing,  and  will  need updating to match any changes to these functions.
19       Edit the script to customize which functions are traced.
20
21       Since this uses BPF, only the root user can use this tool.
22

REQUIREMENTS

24       CONFIG_BPF and bcc.
25

EXAMPLES

27       Print summaries every five second:
28              # cachestat
29
30       Print summaries every five seconds with timestamp:
31              # cachestat -T
32
33       Print summaries each second:
34              # cachestat 1
35
36       Print output every five seconds, three times:
37              # cachestat 5 3
38
39       Print output with timestamp every five seconds, three times:
40              # cachestat -T 5 3
41

FIELDS

43       TIME   Timestamp.
44
45       HITS   Number of page cache hits.
46
47       MISSES Number of page cache misses.
48
49       DIRTIES
50              Number of dirty pages added to the page cache.
51
52       READ_HIT%
53              Read hit percent of page cache usage.
54
55       WRITE_HIT%
56              Write hit percent of page cache usage.
57
58       BUFFERS_MB
59              Buffers size taken from /proc/meminfo.
60
61       CACHED_MB
62              Cached  amount  of  data  in  current  page  cache  taken   from
63              /proc/meminfo.
64

OVERHEAD

66       This traces various kernel page cache functions and maintains in-kernel
67       counts, which are asynchronously copied to user-space. While  the  rate
68       of  operations  can  be very high (>1G/sec) we can have up to 34% over‐
69       head, this is still a relatively efficient way to trace  these  events,
70       and so the overhead is expected to be small for normal workloads.  Mea‐
71       sure in a test environment.
72

SOURCE

74       This is from bcc.
75
76              https://github.com/iovisor/bcc
77
78       Also look in the bcc distribution for a  companion  _examples.txt  file
79       containing example usage, output, and commentary for this tool.
80

OS

82       Linux
83

STABILITY

85       Unstable - in development.
86

AUTHOR

88       Allan McAleavy
89

SEE ALSO

91       https://github.com/brendangregg/perf-tools/blob/master/fs/cachestat
92
93
94
95USER COMMANDS                     2016-01-30                      cachestat(8)
Impressum