info

package
v0.0.1-20220802-0003 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDisksInfo

func GetDisksInfo() map[string]interface{}

func GetHostInfo

func GetHostInfo() *host.InfoStat

func GetMemoryInfo

func GetMemoryInfo() *mem.VirtualMemoryStat

func GetNetInfo

func GetNetInfo() map[string]interface{}

func GetProcessMemoryInfo

func GetProcessMemoryInfo() map[string]interface{}

Types

type CPUInfoStr

type CPUInfoStr struct {
	General  CPUInfo
	Detailed []cpustat.InfoStat
}

func GetCPUInfo

func GetCPUInfo() CPUInfoStr

type SystemStatus

type SystemStatus struct {
	PID                   int
	ExecutableLocation    string
	UserID                int
	GroupID               int
	Started               time.Time
	RunningTimeSeconds    float64
	NrOfRunningGoroutines int
	MemStats              map[string]interface{}
	NrOfCPUUsed           int
	NrOfCGOCalls          int64
	CPUInfo               CPUInfoStr

	DisksInfo         map[string]interface{}
	NetInfo           map[string]interface{}
	HostInfo          *host.InfoStat
	VirtualMemoryStat *mem.VirtualMemoryStat
}

TODO: should be moved in helpers or smth

func GetSystemStatus

func GetSystemStatus() SystemStatus

Jump to

Keyboard shortcuts

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