vmstat

package
v0.0.0-...-759d9de Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCPUInvalid = fmt.Errorf("len (cpu.Percent) != 1")

Functions

This section is empty.

Types

type VmStat

type VmStat struct {
	CpuPercent float64

	MemTotal     uint64
	MemAvailable uint64

	DiskTotal   uint64
	DiskPercent float64
	DiskUsed    uint64
	// contains filtered or unexported fields
}

func New

func New() *VmStat

func NewWithPath

func NewWithPath(path string) *VmStat

func (*VmStat) GetCpuStr

func (s *VmStat) GetCpuStr() string

func (*VmStat) GetDiskStr

func (s *VmStat) GetDiskStr() string

func (*VmStat) GetMemStr

func (s *VmStat) GetMemStr() string

func (*VmStat) String

func (s *VmStat) String() string

func (*VmStat) Update

func (s *VmStat) Update() error

Jump to

Keyboard shortcuts

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