resource

package
v0.0.0-...-ecc5721 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBootTime

func GetBootTime() uint64

func GetCPUName

func GetCPUName() string

func GetDNS

func GetDNS() string

func GetDirSize

func GetDirSize(path string, except string) uint64

func GetGateway

func GetGateway() string

func GetHostInfo

func GetHostInfo() (serial, id, model, vendor string)

func GetMemTotal

func GetMemTotal() (total uint64)

func GetProcResouce

func GetProcResouce(pid int) (cpu float64, rss uint64, readSpeed, writeSpeed float64, fds int32, startAt int64, err error)

Types

type IOState

type IOState struct {
	Time       time.Time
	ReadBytes  uint64
	WriteBytes uint64
}

type ProcInfo

type ProcInfo struct {
	CPUPercent float64
	FdCnt      uint64
	RSS        uint64  //bytes
	ReadSpeed  float64 //Bps
	WriteSpeed float64 //Bps
	StartedAt  int64   //unix timestamp
}

Jump to

Keyboard shortcuts

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