package disk

import "github.com/shirou/gopsutil/disk"

Index

Functions

func IOCounters

func IOCounters(names ...string) (map[string]IOCountersStat, error)

Types

type IOCountersStat

type IOCountersStat struct {
	ReadCount        uint64 `json:"readCount"`
	MergedReadCount  uint64 `json:"mergedReadCount"`
	WriteCount       uint64 `json:"writeCount"`
	MergedWriteCount uint64 `json:"mergedWriteCount"`
	ReadBytes        uint64 `json:"readBytes"`
	WriteBytes       uint64 `json:"writeBytes"`
	ReadTime         uint64 `json:"readTime"`
	WriteTime        uint64 `json:"writeTime"`
	IopsInProgress   uint64 `json:"iopsInProgress"`
	IoTime           uint64 `json:"ioTime"`
	WeightedIO       uint64 `json:"weightedIO"`
	Name             string `json:"name"`
	SerialNumber     string `json:"serialNumber"`
}

func (IOCountersStat) String

func (d IOCountersStat) String() string

type PartitionStat

type PartitionStat struct {
	Device     string `json:"device"`
	Mountpoint string `json:"mountpoint"`
	Fstype     string `json:"fstype"`
	Opts       string `json:"opts"`
}

func Partitions

func Partitions(all bool) ([]PartitionStat, error)

func (PartitionStat) String

func (d PartitionStat) String() string

type UsageStat

type UsageStat struct {
	Path              string  `json:"path"`
	Fstype            string  `json:"fstype"`
	Total             uint64  `json:"total"`
	Free              uint64  `json:"free"`
	Used              uint64  `json:"used"`
	UsedPercent       float64 `json:"usedPercent"`
	InodesTotal       uint64  `json:"inodesTotal"`
	InodesUsed        uint64  `json:"inodesUsed"`
	InodesFree        uint64  `json:"inodesFree"`
	InodesUsedPercent float64 `json:"inodesUsedPercent"`
}

func Usage

func Usage(path string) (*UsageStat, error)

func (UsageStat) String

func (d UsageStat) String() string

Source Files

disk.go disk_fallback.go

Version
v2.17.11+incompatible
Published
Nov 21, 2017
Platform
js/wasm
Imports
2 packages
Last checked
5 hours ago

Tools for package owners.