diskstat

package
v0.0.0-...-229c351 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2015 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package diskstat implements metrics collection related to disk IO usage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByUsage

type ByUsage []*PerDiskStat

Return list of disks sorted by Usage

func (ByUsage) Len

func (a ByUsage) Len() int

func (ByUsage) Less

func (a ByUsage) Less(i, j int) bool

func (ByUsage) Swap

func (a ByUsage) Swap(i, j int)

type DiskStat

type DiskStat struct {
	Disks map[string]*PerDiskStat
	// contains filtered or unexported fields
}

func New

func (*DiskStat) ByUsage

func (c *DiskStat) ByUsage() []*PerDiskStat

ByUsage() returns an slice of *PerDiskStat entries sorted by usage

func (*DiskStat) Collect

func (s *DiskStat) Collect()

func (*DiskStat) RefreshBlkDevList

func (s *DiskStat) RefreshBlkDevList()

type PerDiskStat

type PerDiskStat struct {
	Metrics *PerDiskStatMetrics

	Name string
	// contains filtered or unexported fields
}

func NewPerDiskStat

func NewPerDiskStat(m *metrics.MetricContext, blkdev string) *PerDiskStat

func (*PerDiskStat) Usage

func (s *PerDiskStat) Usage() float64

Usage returns approximate measure of disk usage (time spent doing IO / wall clock time)

type PerDiskStatMetrics

type PerDiskStatMetrics struct {
	ReadCompleted        *metrics.Counter
	ReadMerged           *metrics.Counter
	ReadSectors          *metrics.Counter
	ReadSpentMsecs       *metrics.Counter
	WriteCompleted       *metrics.Counter
	WriteMerged          *metrics.Counter
	WriteSectors         *metrics.Counter
	WriteSpentMsecs      *metrics.Counter
	IOInProgress         *metrics.Gauge
	IOSpentMsecs         *metrics.Counter
	WeightedIOSpentMsecs *metrics.Counter
	SectorSize           *metrics.Gauge
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL