vfsstat(8)
π vfsstat(8) π
okay so bestie, vfsstat is the tool that is literally obsessed with VFS calls π
it's a manual-page-level flex, so pay attention π«Ά
β¨ NAME β¨
vfsstat is your go-to for statistics on some common VFS calls π and it runs on Linux eBPF/bcc π§
β¨ SYNOPSIS β¨
vfsstat [interval [count]]
β¨ DESCRIPTION β¨
okay so this one traces some common VFS calls and prints per-second summaries π it's giving workload characterization vibes, and it's super useful for spotting patterns in how operations get used over time π
this works by tracing some kernel vfs functions with dynamic tracing π but heads up, it will need updating whenever those functions change π if you want to customize which functions get traced, just edit the script. also check out vfscount, which is way easier to customize if you wanna trace multiple functions π¦
π Since this uses BPF, only the root user can use this tool. no cap, you need to be root or it won't work.
β¨ REQUIREMENTS β¨
you'll need CONFIG_BPF and bcc π
β¨ EXAMPLES β¨
Print summaries each second:
# vfsstat
Print output every five seconds, three times:
# vfsstat 5 3
β¨ FIELDS β¨
READ/sβ the number ofvfs_read()calls, as a per-second average πWRITE/sβ the number ofvfs_write()calls, as a per-second average βοΈCREATE/sβ the number ofvfs_create()calls, as a per-second average πΈOPEN/sβ the number ofvfs_open()calls, as a per-second average πͺFSYNC/sβ the number ofvfs_fsync()calls, as a per-second average πΎ
β¨ OVERHEAD β¨
this traces various kernel vfs functions and keeps counts in the kernel, which then get asynchronously copied to user-space π§ the rate of VFS operations can be super high (>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, bestie π«Ά
β¨ SOURCE β¨
this one is from bcc π
https://github.com/iovisor/bcc
also look in the bcc distribution for a companion _examples.txt file. it has example usage, output, and commentary for this tool, and it's honestly a treat π
β¨ OS β¨
Linux π§
β¨ STABILITY β¨
Unstable - in development. so it's still cooking π³
β¨ AUTHOR β¨
written by Brendan Gregg π
β¨ SEE ALSO β¨
vfscount(8)π¦
okay that's the whole tea β this page is from the USER COMMANDS section, last updated 2015-08-18, and it's from bcc π«Ά go trace some VFS calls and slay the day, bestie πβ¨
π¦ where this page comes from
- centos-stream 10: bcc-tools 0.36.1-1.el10 Β· Apache-2.0
- centos-stream 9: bcc-tools 0.36.1-1.el9 Β· ASL 2.0
- fedora 43: bcc-tools 0.35.0-2.fc43 Β· Apache-2.0
- fedora 44: bcc-tools 0.35.0-5.fc44 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms