biosnoop.bt(8) System Manager's Manual biosnoop.bt(8)

# [NAME](#NAME)

biosnoop.bt - Block I/O tracing tool, showing per I/O latency. Uses bpftrace/eBPF.

# [SYNOPSIS](#SYNOPSIS)

**biosnoop.bt**

# [DESCRIPTION](#DESCRIPTION)

This is a basic block I/O (disk I/O) tracing tool, showing each I/O event along with the issuing process ID, and the I/O latency. This can be used to investigate disk I/O performance issues.

This tool currently works by dynamic tracing of the blk\_account\*() kernel functions, which will need updating to match any changes to these functions in future kernels versions.

Since this uses BPF, only the root user can use this tool.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bpftrace.

# [EXAMPLES](#EXAMPLES)

[Trace block I/O events, printing per-line summaries:](#Trace)

\# **biosnoop.bt**

# [FIELDS](#FIELDS)

[TIME](#TIME)

Time of the I/O completion, in milliseconds since program start.

[DISK ID](#DISK)

Major and minor device numbers of the disk device.

[COMM](#COMM)

Issuing process name. This often identifies the issuing application process, but I/O may be initiated from kernel threads only.

[PID](#PID)

Issuing process ID. This often identifies the issuing application process, but I/O may be initiated from kernel threads only.

[LAT(ms)](#LAT%28ms%29)

Per I/O latency.

# [OVERHEAD](#OVERHEAD)

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

# [SOURCE](#SOURCE)

This is from bpftrace.

https://github.com/bpftrace/bpftrace

Also look in the bpftrace distribution for a companion \_examples.txt file containing example usage, output, and commentary for this tool.

This is a bpftrace version of the bcc tool of the same name. The bcc tool provides more fields.

https://github.com/iovisor/bcc

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Brendan Gregg

# [SEE ALSO](#SEE_ALSO)

[opensnoop.bt(8)](/man/enterprise-packages/bpftrace/opensnoop.bt.8)

2018-09-11 USER COMMANDS

---

Document: biosnoop.bt(8) from bpftrace 0.27.1-r0 (Chainguard OS)
Source: https://github.com/bpftrace/bpftrace
