systemx

package
v0.0.0-...-d86ec20 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAvailableMemory

func GetAvailableMemory() string

GetAvailableMemory get available memory.

func GetCpuCores

func GetCpuCores() int32

GetCpuCores get cpu cores.

func GetCpuMhz

func GetCpuMhz() string

GetCpuMhz get cpu mhz.

func GetCpuModelName

func GetCpuModelName() string

GetCpuModelName get cpu model name.

func GetFreeDisk

func GetFreeDisk() string

GetFreeDisk get free disk.

func GetTotalDisk

func GetTotalDisk() string

GetTotalDisk get total disk.

func GetTotalMemory

func GetTotalMemory() string

GetTotalMemory get total memory.

func GetUsedDisk

func GetUsedDisk() string

GetUsedDisk get used disk.

func GetUsedMemory

func GetUsedMemory() string

GetUsedMemory get used memory.

func GetUsedPercentDisk

func GetUsedPercentDisk() string

GetUsedPercentDisk get used percent disk.

func GetUsedPercentMemory

func GetUsedPercentMemory() string

GetUsedPercentMemory get used percent memory.

Types

type Info

type Info struct {
	Disk struct {
		Device      string `json:"device"`
		Free        string `json:"free"`
		Used        string `json:"used"`
		UsedPercent string `json:"used_percent"`
	} `json:"disk"`

	Cpu struct {
		Name  string `json:"name"`
		Speed string `json:"speed"`
		Core  int32  `json:"core"`
	} `json:"cpu"`

	Memory struct {
		Memory      string `json:"memory"`
		Used        string `json:"used"`
		UsedPercent string `json:"used_percent"`
	} `json:"memory"`
}

func GetSystemInfo

func GetSystemInfo() (*Info, error)

GetSystemInfo get system info.

Jump to

Keyboard shortcuts

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