1biosnoop(8) System Manager's Manual biosnoop(8)
2
3
4
6 biosnoop - Trace block device I/O and print details incl. issuing PID.
7
9 biosnoop
10
12 This tools traces block device I/O (disk I/O), and prints a one-line
13 summary for each I/O showing various details. These include the latency
14 from the time of issue to the device to its completion, and the PID and
15 process name from when the I/O was first created (which usually identi‐
16 fies the responsible process).
17
18 This uses in-kernel eBPF maps to cache process details (PID and comm)
19 by I/O request, as well as a starting timestamp for calculating I/O
20 latency.
21
22 This works by tracing various kernel blk_*() functions using dynamic
23 tracing, and will need updating to match any changes to these func‐
24 tions.
25
26 This makes use of a Linux 4.5 feature (bpf_perf_event_output()); for
27 kernels older than 4.5, see the version under tools/old, which uses an
28 older mechanism
29
30 Since this uses BPF, only the root user can use this tool.
31
33 CONFIG_BPF and bcc.
34
36 Trace all block device I/O and print a summary line per I/O:
37 # biosnoop
38
40 TIME(s)
41 Time of the I/O, in seconds since the first I/O was seen.
42
43 COMM Cached process name, if present. This usually (but isn't guaran‐
44 teed) to identify the responsible process for the I/O.
45
46 PID Cached process ID, if present. This usually (but isn't guaran‐
47 teed) to identify the responsible process for the I/O.
48
49 DISK Disk device name.
50
51 T Type of I/O: R = read, W = write. This is a simplification.
52
53 SECTOR Device sector for the I/O.
54
55 BYTES Size of the I/O, in bytes.
56
57 LAT(ms)
58 Time for the I/O (latency) from the issue to the device, to its
59 completion, in milliseconds.
60
62 Since block device I/O usually has a relatively low frequency (<
63 10,000/s), the overhead for this tool is expected to be negligible. For
64 high IOPS storage systems, test and quantify before use.
65
67 This is from bcc.
68
69 https://github.com/iovisor/bcc
70
71 Also look in the bcc distribution for a companion _examples.txt file
72 containing example usage, output, and commentary for this tool.
73
75 Linux
76
78 Unstable - in development.
79
81 Brendan Gregg
82
84 disksnoop(8), iostat(1)
85
86
87
88USER COMMANDS 2015-09-16 biosnoop(8)