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] [-P]
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
43       -P     Display block I/O pattern (sequential or random).
44

EXAMPLES

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

FIELDS

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

OVERHEAD

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

SOURCE

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

OS

90       Linux
91

STABILITY

93       Unstable - in development.
94

AUTHOR

96       Brendan Gregg, Rocky Xing
97

SEE ALSO

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