---
name: "dtrace_io"
section: "4"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/dtrace_io"
---

# dtrace\_io(4)

a DTrace provider for tracing events related to disk I/O

## NAME

**dtrace\_io** – a DTrace provider for tracing events related to disk I/O

## SYNOPSIS

**io:::start**(*struct bio \**, *struct devstat \**);

**io:::done**(*struct bio \**, *struct devstat \**);

## DESCRIPTION

The **io** provider allows the tracing of disk I/O events. The **io:::start**() probe fires when a I/O request is about to be sent to the backing driver of a [disk(9)](/disk/9.md) object. This occurs after all [GEOM(4)](/GEOM/4.md) transformations have been performed on the request. The **io:::done**() probe fires when a I/O request is completed. Both probes take a *struct bio \** representing the I/O request as their first argument. The second argument is a *struct devstat \** for the underlying [disk(9)](/disk/9.md) object.

## ARGUMENTS

The fields of *struct bio* are described in the [g\_bio(9)](/g_bio/9.md) manual page, and the fields of *struct devstat* are described in the [devstat(9)](/devstat/9.md) manual page. Translators for the *bufinfo\_t* and *devinfo\_t* D types are defined in */usr/lib/dtrace/io.d*.

## FILES

- */usr/lib/dtrace/io.d*

  DTrace type and translator definitions for the **io** provider.

## EXAMPLES

The following script shows a per-process breakdown of total I/O by disk device:

```
#pragma D option quiet
io:::start
{
        @[args[1]->device_name, execname, pid] = sum(args[0]->bio_length);
}
END
{
        printf("%10s %20s %10s %15s\n", "DEVICE", "APP", "PID", "BYTES");
        printa("%10s %20s %10d %15@d\n", @);
}
```

## COMPATIBILITY

This provider is not compatible with the **io** provider found in Solaris, as its probes use native FreeBSD argument types.

## SEE ALSO

[dtrace(1)](/dtrace/1.md), [devstat(9)](/devstat/9.md), [SDT(9)](/SDT/9.md)

## HISTORY

The **io** provider first appeared in FreeBSD 9.2 and 10.0.

## AUTHORS

This manual page was written by Mark Johnston ⟨*markj@FreeBSD.org*⟩.

## BUGS

The **io:::wait-start**() and **io:::wait-done**() probes are not currently implemented on FreeBSD.
