vfscount(8)
โจ vfscount(8) โ System Manager's Manual โจ
๐ NAME ๐
vfscount โ okay so this one counts VFS calls (anything matching "vfs_*") ๐งฎ It uses Linux eBPF/bcc, so it's lowkey a whole vibe. โจ
๐ SYNOPSIS ๐
vfscount [duration]
๐ฆ DESCRIPTION ๐ฆ
Okay so this tool counts VFS calls ๐ It's super useful for general workload characterization of these operations, aka figuring out what your system is actually doing all day ๐ซถ
Here's the tea: it works by tracing all kernel functions beginning with "vfs_" using dynamic tracing. โ ๏ธ That might match more functions than you actually care about, so if you want to measure something specific, edit the script to customize which functions get traced ๐
Also, since this uses BPF, only the root user can use this tool ๐ no sneaking in as a regular user, bestie ๐
๐ธ REQUIREMENTS ๐ธ
You need CONFIG_BPF and bcc ๐ง no cap, you can't skip these ones ๐ญ
๐ OPTIONS ๐
durationโ how long the trace runs, in seconds โฑ๏ธ
๐ง EXAMPLES ๐ง
Count some VFS calls until you hit Ctrl-C ๐ (the classic move):
# vfscount
Count some VFS calls for ten seconds exactly โฐ:
# vfscount 10
๐ FIELDS ๐
ADDRโ the address of the instruction pointer that got traced ๐ This is only really useful if theFUNCcolumn looks sus and you want to double check the translation ๐ต๏ธโโ๏ธFUNCโ the kernel function name ๐งCOUNTโ how many times it got called while tracing ๐ข
๐ OVERHEAD ๐
This one is actually pretty efficient, bestie โจ It traces kernel vfs functions and keeps the counts in-kernel, which then get asynchronously copied over to user-space ๐ Even though VFS operations can be super high-rate (>1M/sec), 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 first! If overhead is an issue, edit the script to reduce the types of vfs functions traced (currently all beginning with "vfs_"). Don't say I didn't warn you ๐ญ
๐ซถ SOURCE ๐ซถ
This comes from bcc ๐
https://github.com/iovisor/bcc
Also, look in the bcc distribution for a companion _examples.txt file with example usage, output, and commentary for this tool ๐ it's giving helpful.
๐ฅ OS ๐ฅ
Linux ๐ง
๐ STABILITY ๐
Unstable โ it's still in development, so don't be shocked if things shift ๐ง
๐ AUTHOR ๐
Brendan Gregg ๐
โญ SEE ALSO โญ
vfsstat(8) โ go check it out, it's the iconic sibling ๐ฆ
Filed under USER COMMANDS, last updated 2015-08-18, and it's still vfscount(8) forever ๐ Stay curious, 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