---
name: "virtiostat-bpfcc"
section: "8"
platform: "linux"
package: "bpfcc-tools"
version: "0.31.0+ds-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/virtiostat-bpfcc"
---

# virtiostat-bpfcc(8)

Trace VIRTIO devices input/output statistics. Uses Linux eBPF/bcc.

## NAME

virtiostat - Trace VIRTIO devices input/output statistics. Uses Linux eBPF/bcc.

## SYNOPSIS

**virtiostat \[-h\] \[-T\] \[-D\] \[-d DRIVER\] \[-n DEVNAME\] \[INTERVAL\] \[COUNT\]**

## DESCRIPTION

This tool traces VIRTIO devices input/output statistics. It works in lower layer of VIRTIO base driver, so it could trace all the devices of VIRTIO family. For example, we can't get IO statistics of 9p-fs in a guest virtual machine by iostat command, but we can analyze IO statistics by virtiostat. The outputing result shows In/Out SGs(scatter list operation) to represent positive correlation IOPS, and In/Out BW to represent throughput.

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

## REQUIREMENTS

CONFIG\_BPF and bcc.

## OPTIONS

- \-h

  Print usage message.

- \-T

  Include a time column on output (HH:MM:SS).

- \-D

  Show debug infomation of bpf text.

- \-d DRIVER

  Filter for driver name.

- \-n DEVNAME

  Filter for device name.

- INTERVAL

  Print output every interval seconds.

- COUNT

  Total count of trace in seconds.

## EXAMPLES

- Trace virtio device statistics and print 1 second summaries, 10 times:

  \# **virtiostat 1 10**

- Trace virtio block deivces only:

  \# **virtiostat -d virtio\_blk**

## OVERHEAD

This traces the kernel virtqueue\_add\_sgs, virtqueue\_add\_outbuf, virtqueue\_add\_inbuf, virtqueue\_add\_inbuf\_ctx functions. The rate of this depends on all the VIRTIO devices IOPS.

## SOURCE

This is from bcc.

-

  https://github.com/iovisor/bcc

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

## OS

Linux

## STABILITY

Unstable - in development.

## AUTHOR

zhenwei pi

## SEE ALSO

[iostat(1)](/iostat/1.md), [iftop(8)](/iftop/8.md), [funccount(8)](/funccount/8.md)
