vfscount.bt(8)
π vfscount.bt β like, the manual page, bestie π
okay so you found yourself a vfscount.bt(8) page, which lives in the System Manager's Manual section, and honestly? she's a baddie. let's get into it. π
β¨ NAME β¨
vfscount.bt β counts VFS calls ("vfs_*"). uses bpftrace/eBPF. no cap. π
πΈ SYNOPSIS πΈ
vfscount.bt
that's it. that's the whole thing. she's low maintenance. π¦
π« DESCRIPTION π«
so what she does is count VFS calls. and like, why would you even want that? because it's genuinely useful for general workload characterization of these operations β iykyk. π
the way she works is she traces all kernel functions beginning with "vfs_" using dynamic tracing. heads up though, bestie: this may match more functions than you are actually interested in measuring. so if she's doing too much, go edit the script to customize which functions to trace. it's giving choose-your-own-adventure. β¨
π¨ and listen β since this uses BPF, only the root user can use this tool. sorry to the girlies without sudo, that's just the vibe check. π
π§ REQUIREMENTS π§
CONFIG_BPFbpftrace
that's the whole guest list. two icons and nothing else. π«Ά
π EXAMPLES π
count all VFS calls until you hit Ctrl-C:
# vfscount.bt
literally just run it and vibe. π
π FIELDS π
- 1st β Kernel function name (in
@[]) β - 2nd β Number of calls while tracing β
two columns. main character energy only. π
π₯ OVERHEAD π₯
okay so she traces kernel vfs functions and maintains in-kernel counts, which are then asynchronously copied to user-space. and here's the tea: while the rate of VFS operations can be very high (>1M/sec), this is a relatively efficient way to trace these events, so the overhead is expected to be small for normal workloads. slay. π
but ngl, still do the responsible thing: measure in a test environment, and if overheads are an issue, edit the script to reduce the types of vfs functions traced β currently all beginning with "vfs_". π
π SOURCE π
this is from bpftrace. π¦
https://github.com/iovisor/bpftrace
also, go look in the bpftrace distribution for a companion _examples.txt file β it's got example usage, output, and commentary for this tool. free content, we love to see it. π
and for the lore: this is a bpftrace version of the bcc tool of the same name. the bcc tool may provide more options and customizations, so if you want extra, she's right there. π
https://github.com/iovisor/bcc
π§ OS π§
Linux π
β οΈ STABILITY β οΈ
Unstable - in development. she's growing, she's evolving, she's in her era. handle with care. π
π AUTHOR π
Brendan Gregg β the icon, the moment, the blueprint. β¨
π SEE ALSO π
vfsstat.bt(8)β her sister, go say hi π«Ά
π and that's the whole page, bestie π
cute lil sign-off moment: this one's filed under USER COMMANDS, dated 2018-09-06, and it's the vfscount.bt(8) page we've been yapping about this whole time. no thoughts, just VFS calls. periodt. π
πΈ
π¦ 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