Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskIOStats ¶
type DiskIOStats struct { Name string `json:"name"` // device name; like "hda" Readed uint64 `json:"readed"` // total number of reads completed successfully Written uint64 `json:"written"` // total number of writes completed successfully }
DiskIOStats represents disk I/O statistics
func (*DiskIOStats) String ¶
func (ds *DiskIOStats) String() string
func (*DiskIOStats) Subtract ¶
func (ds *DiskIOStats) Subtract(s *DiskIOStats)
type DiskIOUsage ¶
type DiskIOUsage struct { DiskIOStats Delta time.Duration `json:"delta,omitempty"` }
func (*DiskIOUsage) ReadSpeed ¶
func (du *DiskIOUsage) ReadSpeed() float64
ReadSpeed get read speed bytes/second
func (*DiskIOUsage) String ¶
func (du *DiskIOUsage) String() string
func (*DiskIOUsage) WriteSpeed ¶
func (du *DiskIOUsage) WriteSpeed() float64
WriteSpeed get write speed bytes/second
type DiskUsage ¶
type DiskUsage struct { Free uint64 `json:"free"` // total free bytes on file system Available uint64 `json:"available"` // total available bytes on file system to an unprivileged user Total uint64 `json:"total"` // total size of the file system }
func GetDiskUsage ¶
GetDiskUsage returns an object holding the disk usage of volumePath or nil in case of error (invalid path, etc)
type DisksIOStats ¶
type DisksIOStats []DiskIOStats
func GetDisksStats ¶
func GetDisksStats() (DisksIOStats, error)
GetDisksStats get disk I/O statistics.
func (DisksIOStats) Subtract ¶
func (dss DisksIOStats) Subtract(ss DisksIOStats)
type DisksIOUsage ¶
type DisksIOUsage []DiskIOUsage
func GetDisksIOUsage ¶
func GetDisksIOUsage(delta time.Duration) (dsu DisksIOUsage, err error)
GetDisksIOUsage get disks I/O usages between delta duration
Click to show internal directories.
Click to hide internal directories.