xfsdist.bt(8)
β¨ xfsdist.bt β¨
okay bestie, so this is xfsdist.bt, and it lives in the System Manager's Manual, section 8 (that's the big-girl user-commands section, iykyk). It's the XFS latency summarizer and honestly? it's giving observability queen π
πΈ NAME πΈ
xfsdist.bt β summarize XFS operation latency. Uses bpftrace/eBPF. periodt.
π¦ SYNOPSIS π¦
xfsdist.bt
no flags, no args, no drama. she just runs.
π DESCRIPTION π
so this tool sums up the time (latency, bestie, we're talking latency) spent in the common XFS file operations: reads, writes, opens, and syncs. Then it presents all of that as a power-of-2 histogram, because why would you read a million individual numbers when a vibe-check histogram can show you the shape of it π
and the way it does this is lowkey iconic: it uses an in-kernel eBPF map to store the histogram, because efficiency is the moment. β¨
ngl, this works by tracing the xfs_file_operations interface functions β so if those functions ever change, this tool will need updating to match them. not a bug, just a situationship with the kernel API. π
also, since this uses BPF, only the root user can use this tool. sorry to the non-root girlies π
π§ REQUIREMENTS π§
CONFIG_BPFbpftrace
that's it. that's the list. slay.
π EXAMPLES π
Trace XFS operation time, and print a summary on Ctrl-C:
# xfsdist.bt
you run it, you watch, you hit Ctrl-C, she prints. chef's kiss π
π FIELDS π
- 0th β the operation name (shown in
"@[...]") is printed before each I/O histogram. it's the little label that tells you what you're looking at. - 1st, 2nd β this is a range of latency, in microseconds (shown in
"[...)"set notation). so like, the bucket. the range. the whole vibe. - 3rd β a column showing the count of operations in this range. how many times did we land in this bucket, fr fr.
- 4th β this is an ASCII histogram representing the count column. visual! bars! we love a graph that fits in your terminal π
π OVERHEAD π
okay so real talk: this adds low-overhead instrumentation to these XFS operations, including reads and writes from the file system cache.
but here's the thing β those cache reads and writes can be very frequent depending on the workload (like, 1M/sec frequent, bestie), and at that point the overhead of this tool may become noticeable. so please, measure and quantify before use. don't just yolo it into prod and act surprised π
π SOURCE π
this is from bpftrace.
https://github.com/iovisor/bpftrace
also, look in the bpftrace distribution for a companion _examples.txt file β it's got example usage, output, and commentary for this tool. basically the director's cut. π¬
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. obviously. π§
π STABILITY π
Unstable - in development.
she's a work in progress and she's thriving. treat her accordingly π«Ά
π AUTHOR π
Brendan Gregg
πΈ SEE ALSO πΈ
and that's the whole page, bestie! this one came from USER COMMANDS and it's dated 2018-09-08, filed under xfsdist.bt(8). go trace something pretty β¨π
π¦ 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