mdflush(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

✨ 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, in HH:MM:SS format ⏰
  • 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


Okay that's the whole tea, bestie! πŸ’…βœ¨ Mdflush(8) from the USER COMMANDS section, dated 2016-02-13, sending you big love πŸ©·πŸŽ€