logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mdflush - Trace md flush events. Uses Linux eBPF/bcc.

Author

       Brendan Gregg

Description

       This  tool traces flush events by md, the Linux multiple device driver (software RAID). The timestamp and
       md device for the flush are printed.  Knowing when these flushes happen can  be  useful  for  correlation
       with unexplained spikes in disk latency.

       This  works  by  tracing  the  kernel  md_flush_request()  function  using dynamic tracing, and will need
       updating to match any changes to this function.

       Note that the flushes themselves are likely to originate from higher in the I/O stack, such as  from  the
       file systems.

       Since this uses BPF, only the root user can use this tool.

Examples

       Trace md flush events:
              # mdflush

Fields

       TIME   Time of the flush event (HH:MM:SS).

       PID    The process ID that was on-CPU when the event was issued. This may identify the cause of the flush
              (eg, the "sync" command), but will often identify a kernel worker thread that was managing I/O.

       COMM   The command name for the PID.

       DEVICE The md device name.

Name

       mdflush - Trace md flush events. Uses Linux eBPF/bcc.

Os

       Linux

Overhead

       Expected to be negligible.

Requirements

       CONFIG_BPF and bcc.

See Also

biosnoop(8)

USER COMMANDS                                      2016-02-13                                         mdflush(8)

Source

       This is from bcc.

              https://github.com/iovisor/bcc

       Also  look  in  the bcc distribution for a companion _examples.txt file containing example usage, output,
       and commentary for this tool.

Stability

       Unstable - in development.

Synopsis

mdflush

See Also