1biosnoop(8)                 System Manager's Manual                biosnoop(8)
2
3
4

NAME

6       biosnoop - Trace block device I/O and print details incl. issuing PID.
7

SYNOPSIS

9       biosnoop [-h] [-Q] [-d DISK]
10

DESCRIPTION

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 la‐
20       tency.
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.4 feature (bpf_perf_event_output()); for
27       kernels older than 4.4, 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

REQUIREMENTS

33       CONFIG_BPF and bcc.
34

OPTIONS

36       -h     Print usage message.
37
38       -Q     Include a column showing the time spent queued in the OS.
39
40       -d DISK
41              Trace this disk only.
42

EXAMPLES

44       Trace all block device I/O and print a summary line per I/O:
45              # biosnoop
46

FIELDS

48       TIME(s)
49              Time  of  the I/O completion, in seconds since the first I/O was
50              seen.
51
52       COMM   Cached process name, if present. This usually (but isn't guaran‐
53              teed) to identify the responsible process for the I/O.
54
55       PID    Cached  process  ID, if present. This usually (but isn't guaran‐
56              teed) to identify the responsible process for the I/O.
57
58       DISK   Disk device name.
59
60       T      Type of I/O: R = read, W = write. This is a simplification.
61
62       SECTOR Device sector for the I/O.
63
64       BYTES  Size of the I/O, in bytes.
65
66       QUE(ms)
67              Time the I/O was queued in the OS before being issued to the de‐
68              vice, in milliseconds.
69
70       LAT(ms)
71              Time  for the I/O (latency) from the issue to the device, to its
72              completion, in milliseconds.
73

OVERHEAD

75       Since block device I/O  usually  has  a  relatively  low  frequency  (<
76       10,000/s), the overhead for this tool is expected to be negligible. For
77       high IOPS storage systems, test and quantify before use.
78

SOURCE

80       This is from bcc.
81
82              https://github.com/iovisor/bcc
83
84       Also look in the bcc distribution for a  companion  _examples.txt  file
85       containing example usage, output, and commentary for this tool.
86

OS

88       Linux
89

STABILITY

91       Unstable - in development.
92

AUTHOR

94       Brendan Gregg, Rocky Xing
95

SEE ALSO

97       disksnoop(8), iostat(1)
98
99
100
101USER COMMANDS                     2015-09-16                       biosnoop(8)
Impressum