os

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SysInfoInit

func SysInfoInit()

Types

type CpuInfo

type CpuInfo struct {
	Core  int `json:"core"`
	Total int `json:"total"`
	Used  int `json:"used"`
	Usage int `json:"usage"`
}

type DiskInfo

type DiskInfo struct {
	Name    string `json:"name"`
	Mounted string `json:"mounted"`
	Total   int    `json:"total"`
	Used    int    `json:"used"`
	Usage   int    `json:"usage"`
}

type MemInfo

type MemInfo struct {
	Total int `json:"total"`
	Used  int `json:"used"`
	Free  int `json:"free"`
	Cache int `json:"cache"`
	Usage int `json:"usage"`
}

type Network

type Network struct {
	Name     string `json:"name"`
	Downflow string `json:"downflow"`
	Upflow   string `json:"upflow"`
}

type SysInfo

type SysInfo struct {
	sync.Mutex
	Date string     `json:"date"`
	Cpu  CpuInfo    `json:"cpu"`
	Mem  MemInfo    `json:"mem"`
	Net  []Network  `json:"network"`
	Disk []DiskInfo `json:"disk"`
}

func SysInfoGetFromLocal

func SysInfoGetFromLocal() SysInfo

func SysInfoGetFromValue

func SysInfoGetFromValue(value string) *SysInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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