1mdflush(8) System Manager's Manual mdflush(8)
2
3
4
6 mdflush.bt - Trace md flush events. Uses bpftrace/eBPF.
7
9 mdflush.bt
10
12 This tool traces flush events by md, the Linux multiple device driver
13 (software RAID). The timestamp and md device for the flush are printed.
14 Knowing when these flushes happen can be useful for correlation with
15 unexplained spikes in disk latency.
16
17 This works by tracing the kernel md_flush_request() function using ker‐
18 nel dynamic tracing, and will need updating to match any changes to
19 this function.
20
21 Note that the flushes themselves are likely to originate from higher in
22 the I/O stack, such as from the file systems.
23
24 Since this uses BPF, only the root user can use this tool.
25
27 CONFIG_BPF and bpftrace.
28
30 Trace md flush events:
31 # mdflush.bt
32
34 TIME Time of the flush event (HH:MM:SS).
35
36 PID The process ID that was on-CPU when the event was issued. This
37 may identify the cause of the flush (eg, the "sync" command),
38 but will often identify a kernel worker thread that was managing
39 I/O.
40
41 COMM The command name for the PID.
42
43 DEVICE The md device name.
44
46 Expected to be negligible.
47
49 This is from bpftrace.
50
51 https://github.com/iovisor/bpftrace
52
53 Also look in the bpftrace distribution for a companion _examples.txt
54 file containing example usage, output, and commentary for this tool.
55
56 This is a bpftrace version of the bcc tool of the same name. The bcc
57 tool may provide more options and customizations.
58
59 https://github.com/iovisor/bcc
60
62 Linux
63
65 Unstable - in development.
66
68 Brendan Gregg
69
71 biosnoop(8)
72
73
74
75USER COMMANDS 2018-09-07 mdflush(8)