virtiostat(8)
π virtiostat π
π¦ NAME
okay so virtiostat is a tracer for VIRTIO devices' input/output statistics π It uses Linux eBPF/bcc, so it's basically built on bcc π₯
β¨ SYNOPSIS β¨
virtiostat [-h] [-T] [-D] [-d DRIVER] [-n DEVNAME] [INTERVAL] [COUNT]
π DESCRIPTION
bestie, this tool traces input/output statistics for VIRTIO devices πΈ It works in the lower layer of the VIRTIO base driver, so it can trace every device in the VIRTIO family β¨ Like, we can't see the IO stats of 9p-fs in a guest virtual machine with the iostat command, but virtiostat can analyze them, no cap π
The output shows In/Out SGs (scatter list operations) to represent positive correlation IOPS, and In/Out BW to represent throughput π So the SGs are the vibe for IOPS and the BW is the vibe for throughput π«Ά
π Since this uses BPF, only the root user can use this tool. No root, no tracing, periodt π
π REQUIREMENTS
You need CONFIG_BPF and bcc π§
π OPTIONS
-hβ prints the usage message π-Tβ adds a time column to the output, formatted asHH:MM:SSβ°-Dβ shows debug info for the bpf text π-dDRIVER β filters by driver name π¦-nDEVNAME β filters by device name π- INTERVAL β prints output every INTERVAL seconds β¨
- COUNT β the total count of the trace, in seconds π₯
π§ EXAMPLES
Trace virtio device stats and print 1 second summaries, 10 times π
# virtiostat 1 10
Trace virtio block devices only πΈ
# virtiostat -d virtio_blk
β‘ OVERHEAD
This one traces the kernel virtqueue_add_sgs, virtqueue_add_outbuf, virtqueue_add_inbuf, and virtqueue_add_inbuf_ctx functions π How much overhead you get depends on the IOPS of all the VIRTIO devices, so it can get a little intense π
π· SOURCE
This is from bcc π The link is:
https://github.com/iovisor/bcc
Also look in the bcc distribution for a companion _examples.txt file, which has example usage, output, and commentary for this tool π
π» OS
Linux π§
π§ͺ STABILITY
Unstable - in development. π§ Be gentle with it, it's still cooking π³
π AUTHOR
zhenwei pi π
π SEE ALSO
iostat(1), iftop(8), funccount(8) π«Ά
Footer check π this page lives in the USER COMMANDS section and was last updated 2021-02-15, so it's giving fresh but still classic π Love you, bestie, and go trace some VIRTIO β¨π¦
π¦ where this page comes from
- centos-stream 10: bcc-tools 0.36.1-1.el10 Β· Apache-2.0
- centos-stream 9: bcc-tools 0.36.1-1.el9 Β· ASL 2.0
- fedora 43: bcc-tools 0.35.0-2.fc43 Β· Apache-2.0
- fedora 44: bcc-tools 0.35.0-5.fc44 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms