cachestat-bpfcc: Count cache kernel function calls
cachestat-bpfcc [-h] [-T] [interval] [count]
What it does
Count cache kernel function calls. Part of the bcc tools (bpfcc-tools 0.35.0 on Ubuntu, installed as /usr/sbin/cachestat-bpfcc; upstream and other distributions call it cachestat). It loads an eBPF program, so it needs root.
Options you will use
interval- output interval, in seconds
count- number of outputs
-T, --timestamp- include timestamp on output
Gotchas
- Page cache hits and misses per interval.
- As a normal user it fails with "could not open bpf map: ..., error: Operation not permitted" (unprivileged BPF is off on Ubuntu).
Try cachestat-bpfcc in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.