bitesize.bt(8)
π bitesize.bt(8) π
Okay bestie, this is the System Manager's Manual entry for bitesize.bt, so let's get into it β¨
π NAME π
bitesize.bt is a tool that shows your disk I/O sizes as a histogram. It's powered by bpftrace and eBPF π¦
πΈ SYNOPSIS πΈ
bitesize.bt
π₯ DESCRIPTION π₯
okay so this one is for figuring out the distribution of block device (disk) I/O sizes. Like, what sizes are actually getting hit, and how often π If you want to go deeper into block device I/O, check out biosnoop.bt(8) π
It's built on the tracepoint:block:block_rq_issue tracepoint, and it's honestly a simple example of bpftrace, so it's a great one to learn from π§
Also, this uses BPF, so only the root user can run it. no cap π
π REQUIREMENTS π
You'll need CONFIG_BPF and bpftrace. That's the whole list, bestie π
π EXAMPLES π
To trace block I/O and summarize it as a histogram by process:
# bitesize.bt
π¦ FIELDS π¦
- 0th π β A process name (shown as
@[...]) gets printed before each I/O histogram. - 1st, 2nd π β This is the range of I/O sizes, in Kbytes (shown in set notation as
[...)). - 3rd π β A column with the count of I/O in that range.
- 4th π β An ASCII histogram that represents the count column. it's giving visual π
β OVERHEAD β
Block device I/O is usually pretty low frequency (< 10,000/s), so the overhead for this tool is expected to be low or negligible β¨
For high IOPS storage systems, test and quantify before use. Don't just yolo it on a busy server π
π SOURCE π
This one comes from bpftrace π
https://github.com/bpftrace/bpftrace
Also, look in the bpftrace distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, and it's lowkey the best way to learn it π
This is a bpftrace version of the bcc tool of the same name:
https://github.com/iovisor/bcc
π§ OS π§
Linux, obviously π§
π«§ STABILITY π«§
Unstable - in development. So it might change on you, bestie π
π AUTHOR π
Brendan Gregg, the legend himself π₯
π SEE ALSO π
biosnoop.bt(8)π
β¨ Manual page for bitesize.bt, from the USER COMMANDS section, dated 2018-09-07, and the bitesize.bt(8) entry π
Stay iconic, bestie π«Ά
π¦ 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