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 [-hQ]
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
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.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 quueued in the OS.
39

EXAMPLES

41       Trace all block device I/O and print a summary line per I/O:
42              # biosnoop
43

FIELDS

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

OVERHEAD

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

SOURCE

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

OS

85       Linux
86

STABILITY

88       Unstable - in development.
89

AUTHOR

91       Brendan Gregg
92

SEE ALSO

94       disksnoop(8), iostat(1)
95
96
97
98USER COMMANDS                     2015-09-16                       biosnoop(8)
Impressum