vfscount.bt(8)
π vfscount.bt(8) π
System Manager's Manual π
β¨ NAME β¨
vfscount.bt β okay so this one counts VFS calls (anything named "vfs_*") π₯ It runs on bpftrace/eBPF π
πΈ SYNOPSIS πΈ
vfscount.bt
π DESCRIPTION π
okay so this tool counts VFS calls, and it's giving super useful vibes for general workload characterization of these operations π§
how it works: it traces every kernel function that starts with "vfs_" using dynamic tracing β¨ heads up, this might catch more functions than you actually care about π so if that's you, just edit the script and customize which functions get traced. no judgment π«Ά
β οΈ bestie, this one uses BPF, so only the root user can run it. sorry not sorry π
π REQUIREMENTS π
you'll need CONFIG_BPF and bpftrace π
π¦ EXAMPLES π¦
Count all VFS calls until you hit Ctrl-C:
# vfscount.bt
π FIELDS π
- 1st β the kernel function name (shows up in
@[]) π - 2nd β the number of calls while tracing π
π₯ OVERHEAD π₯
ngl this is lowkey iconic: it traces kernel vfs functions and keeps the counts in-kernel, then asynchronously copies them over to user-space π§ the VFS rate can get wild (like >1M/sec), but this is a relatively efficient way to trace these events, so the overhead should be small for normal workloads β¨
still, measure in a test environment first π
and if the overhead is an issue, edit the script to trace fewer vfs functions (right now it's all of the ones beginning with "vfs_") π«Ά
π SOURCE π
this is from bpftrace π§
https://github.com/bpftrace/bpftrace
also check the bpftrace distribution for a companion _examples.txt file. it has example usage, output, and commentary for this tool π
this is the bpftrace version of the bcc tool with the same name. the bcc tool might give you more options and customizations π
https://github.com/iovisor/bcc
π» OS π»
Linux π§
π§ STABILITY π§
Unstable β still in development, so be a little careful π
π AUTHOR π
Brendan Gregg π
π¦ SEE ALSO π¦
vfsstat.bt(8) π
bestie, that's the whole page! β¨ bpftrace source, version and date: USER COMMANDS, 2018-09-06 π stay curious and keep those VFS calls counted ππ«Ά
π¦ where this page comes from
- alpine 3.24: bpftrace-tools-doc 0.26.1-r0 Β· Apache-2.0
- arch rolling: bpftrace 0.27.0-2 Β· Apache-2.0
- centos-stream 10: bpftrace 0.26.1-1.el10 Β· Apache-2.0
- centos-stream 9: bpftrace 0.26.1-1.el9 Β· ASL 2.0
- debian trixie: bpftrace 0.23.2-1 Β· Apache-2.0
- fedora 43: bpftrace 0.24.0-1.fc43 Β· Apache-2.0
- fedora 43: bpftrace 0.24.2-1.fc43 Β· Apache-2.0
- fedora 44: bpftrace 0.24.2-3.fc44 Β· Apache-2.0
- nixos 26.05: bpftrace 0.25.1
- nixpkgs unstable: bpftrace 0.27.1
- opensuse-leap 16.0: bpftrace-tools 0.23.5-160000.1.2 Β· Apache-2.0
- ubuntu questing: bpftrace 0.23.5-1ubuntu1 Β· Apache-2.0
- ubuntu resolute: bpftrace 0.25.0-1ubuntu1 Β· Apache-2.0
- ubuntu stonking: bpftrace 0.25.0-1ubuntu2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms