cpu

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoresInfo

func GetCoresInfo(ci *CpuInfo)

func GetGlobalInfo

func GetGlobalInfo(ci *CpuInfo)

func GetModelName

func GetModelName(ci *CpuInfo)

Types

type Context

type Context struct {
	Procfs string
}
var Ctx Context

type Core

type Core struct {
	Name      string
	User      int
	Nice      int
	System    int
	Idle      int
	Iowait    int
	Irq       int
	Softirq   int
	Steal     int
	Guest     int
	GuestNice int
}

type CpuInfo

type CpuInfo struct {
	CoreNum          int
	OnlineCore       string
	Arch             string
	CpuOpMode        string
	ByteOrder        string
	ThreadPerCore    int
	CorePerSocket    int
	Socket           int
	NumaNodeNum      int
	VendorId         string
	CpuFamily        string
	ModelName        string
	Freq             string
	HypervisorVendor string
	Virtualization   string
	L1dCache         string
	L1iCache         string
	L2Cache          string
	L3Cache          string
	NumaNodes        []NumaNode
	Cores            []Core
}

func GetCpuInfo

func GetCpuInfo() CpuInfo

type NumaNode

type NumaNode struct {
	Name string
	Cpus string
}

Jump to

Keyboard shortcuts

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