mdflush(8)
β¨ mdflush(8) β¨
Okay bestie, this is the manual page for mdflush, and it's giving "trace md flush events" ππ
π NAME
mdflush - Trace md flush events. Uses Linux eBPF/bcc. π¦
π SYNOPSIS
mdflush
π DESCRIPTION
okay so mdflush traces flush events issued by md, the Linux multiple device driver (aka software RAID) π§ Every time one happens, it prints the timestamp and the md device the flush hit. β°
This is lowkey super useful because knowing when these flushes happen lets you line them up with those unexplained spikes in disk latency. Main character debugging energy πβ¨
Under the hood, it works by dynamically tracing the kernel md_flush_request() function. That means it will need updating if that function ever changes, so keep that in mind π
Heads up: the flushes themselves are likely coming from higher up in the I/O stack, such as from the file systems. The tool shows you the flush, not necessarily who started the whole chain. π
Also, since this uses BPF, only the root user can run this tool. No cap, no root, no tool ππ
π REQUIREMENTS
You need CONFIG_BPF and bcc πΈ
β¨ EXAMPLES
Trace md flush events:
# mdflush
π FIELDS
TIMEβ when the flush event happened, inHH:MM:SSformat β°PIDβ the process ID that was on-CPU when the event was issued. This can point to the cause of the flush (like the"sync"command), but honestly it's often a kernel worker thread that was managing I/O π§΅COMMβ the command name for that PID πDEVICEβ the md device name π
π¦ OVERHEAD
Expected to be negligible. Basically zero drama for your system π
π«Ά SOURCE
This one comes from bcc π Find it at:
https://github.com/iovisor/bcc
Also, go check the bcc distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, so it's a total vibe ππΈ
π OS
Linux π§
π§ STABILITY
Unstable - in development. Still cooking, bestie π³β
π©βπ» AUTHOR
Brendan Gregg π
π SEE ALSO
biosnoop(8)π«§
Okay that's the whole tea, bestie! π β¨ Mdflush(8) from the USER COMMANDS section, dated 2016-02-13, sending you big love π©·π
π¦ where this page comes from
- debian bookworm: bpfcc-tools 0.26.0+ds-1 Β· Apache-2.0
- debian trixie: bpfcc-tools 0.31.0+ds-7 Β· Apache-2.0
- ubuntu noble: bpfcc-tools 0.29.1+ds-1ubuntu7 Β· Apache-2.0
- ubuntu questing: bpfcc-tools 0.31.0+ds-7ubuntu2 Β· Apache-2.0
- ubuntu resolute: bpfcc-tools 0.35.0+ds-1ubuntu2 Β· Apache-2.0
- ubuntu stonking: bpfcc-tools 0.35.0+ds-1ubuntu4 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms