cpu

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CpuInfo

type CpuInfo struct {
	ModelName    string  `json:"modelName"`    //CPU型号
	Cores        int     `json:"cores"`        //CPU核心数
	LogicalCores int     `json:"logicalCores"` //CPU逻辑核心数
	Percent      float64 `json:"percent"`      //CPU使用率
	Load1        float64 `json:"load1"`        //1分钟平均负载
	Load5        float64 `json:"load5"`        //5分钟平均负载
	Load15       float64 `json:"load15"`       //15分钟平均负载
	LastTime     string  `json:"lastTime"`     //采集时间
}

func GetCpuInfo

func GetCpuInfo() *CpuInfo

func NewCpuInfo

func NewCpuInfo() *CpuInfo

func (CpuInfo) String

func (o CpuInfo) String() string

Jump to

Keyboard shortcuts

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