iostat

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

README

iostat - reports I/O and CPU statistics

GoDoc

iostat reports I/O statistics. currently supported OSes are:

  • macOS

Documentation

Overview

Package iostat presents I/O and CPU statistics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUStats

type CPUStats struct {
	// consumed cpu ticks for each.
	User uint64
	Nice uint64
	Sys  uint64
	Idle uint64
}

CPUStats represents CPU statistics.

func ReadCPUStats

func ReadCPUStats() (*CPUStats, error)

ReadCPUStats returns statistics of CPU usage.

type DriveStats

type DriveStats struct {
	Name      string // drive name
	Size      int64  // total drive size in bytes
	BlockSize int64  // block size in bytes

	BytesRead      int64
	BytesWritten   int64
	NumRead        int64
	NumWrite       int64
	TotalReadTime  time.Duration
	TotalWriteTime time.Duration
	ReadLatency    time.Duration
	WriteLatency   time.Duration
	ReadErrors     int64
	WriteErrors    int64
	ReadRetries    int64
	WriteRetries   int64
}

DriveStats represents I/O statistics of a drive.

func ReadDriveStats

func ReadDriveStats() ([]*DriveStats, error)

ReadDriveStats returns statistics of each of the drives.

type LoadAvg

type LoadAvg struct {
	// load averages
	Load1  float64 // over past 1 minute
	Load5  float64 // over past 5 minutes
	Load15 float64 // over past 15 minutes
}

LoadAvg represents load averages of the system.

func ReadLoadAvg

func ReadLoadAvg() (*LoadAvg, error)

ReadLoadAvg returns load averages over periods of time.

Jump to

Keyboard shortcuts

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