The Barista Logo

barista

An i3status alternative in golang

Download sample-bar Download i3status example View on GitHub

Disk IO

godoc
import "barista.run/modules/diskio"

Display disk I/O rates for a device: diskio.New("sda1").

The disk names used are the ones shown in the third column of /proc/diskstats.

Configuration

Because the diskio module performs a single read to update all instances, the refresh interval can only be set for the package as a whole.

Example

sda1: 5.0 KiB/s

Show the total disk activity for sda1:

diskio.New("sda1").Output(func(i diskio.IO) bar.Output) {
	return outputs.Textf("sda1: %s", outputs.IByterate(i.Total()))
})

Data: type IO struct

Fields

Methods

Documentation for unit.Datarate