cpuKit

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBrandName

func GetBrandName() string

GetBrandName CPU品牌名称

@return e.g."Apple M1 Pro"

func GetCpuId

func GetCpuId() (string, error)

GetCpuId

PS: cpu.Info() 目前仅支持Windows环境,不支持:Mac环境(M1)、Linux环境.

Linux下用命令查看CPU ID: https://blog.csdn.net/benwdm/article/details/84685292

func GetNumber

func GetNumber() int

GetNumber returns the number of logical CPUs usable by the current process.

func GetPercent

func GetPercent() (float64, error)

GetPercent CPU使用率

func GetVendor

func GetVendor() string

GetVendor CPU供应商

@return e.g."Apple"

func InVirtualMachine

func InVirtualMachine() bool

InVirtualMachine 是否在虚拟机中?

Types

This section is empty.

Jump to

Keyboard shortcuts

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