vfsstat.bt(8)
β¨ vfsstat.bt β¨
okay bestie, gather round, because this is vfsstat.bt, a lil page from section 8 of the System Manager's Manual, and it's genuinely so useful π
πΈ NAME πΈ
vfsstat.bt β count key VFS calls. Uses bpftrace/eBPF. no cap. π¦
π SYNOPSIS π
vfsstat.bt
π DESCRIPTION π
okay so what this does is it traces some common VFS calls and prints per-second summaries. it's giving general workload characterization, and it's also lowkey perfect for spotting patterns in operation usage over time. main character observability energy β¨
the way it works is by tracing some kernel vfs functions using dynamic tracing β so heads up, it will need updating to match any changes to these functions. if you wanna customize which functions get traced, edit the script, fr fr. also go look at vfscount, because that one is more easily customized to trace multiple functions π
since this uses BPF, only the root user can use this tool. periodt. π
π§ REQUIREMENTS π§
CONFIG_BPFbpftrace
π EXAMPLES π
count some VFS calls, printing per-second summaries until Ctrl-C is hit:
# vfsstat.bt
β FIELDS β
HH:MM:SSβ each output summary is prefixed by the time of printing in"HH:MM:SS"format.1stβ kernel function name (in@[]).2ndβ number of calls while tracing.
π₯ OVERHEAD π₯
so it traces various kernel vfs functions and maintains in-kernel counts, which get asynchronously copied to user-space. and yeah, the rate of VFS operations can be very high (>1M/sec), but this is a relatively efficient way to trace these events, so the overhead is expected to be small for normal workloads. π
measure in a test environment. seriously bestie, do it. π«Ά
π SOURCE π
this is from bpftrace.
https://github.com/iovisor/bpftrace
also go look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool π
this is a bpftrace version of the bcc tool of the same name. the bcc tool may provide more options and customizations.
https://github.com/iovisor/bcc
π OS π
Linux
π STABILITY π
Unstable β in development. it's in its messy era, we respect the journey πΈ
π AUTHOR π
Brendan Gregg
π¦ SEE ALSO π¦
okay that's the whole thing, you're literally so welcome π this page came to you from the USER COMMANDS corner of the manual, dated 2018-09-06, and yes that's the vibe check, slay, go count some VFS calls πβ¨
π¦ where this page comes from
- debian bookworm: bpftrace 0.17.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms