Documentation ¶
Index ¶
- Variables
- func GetBrandName() string
- func GetCpuId() (string, error)
- func GetFamily() int
- func GetFrequency() int64
- func GetLogicalCores() int
- func GetModel() int
- func GetPhysicalCores() int
- func GetThreadsPerCore() int
- func GetUsage() (float64, error)
- func GetVendorID() cpuid.Vendor
- func GetVendorString() string
- func SetUp()
Constants ¶
This section is empty.
Variables ¶
View Source
var GetCpuNumber func() int = runtime.NumCPU
GetCpuNumber returns the number of logical CPUs usable by the current process.
View Source
var GetFeatureSet func() []string = cpuid.CPU.FeatureSet
View Source
var InVirtualMachine func() bool = cpuid.CPU.VM
InVirtualMachine 是否在虚拟机中?
Functions ¶
func GetCpuId ¶
GetCpuId
PS: cpu.Info() 目前仅支持Windows环境,不支持:Mac环境(M1)、Linux环境.
Linux下用命令查看CPU ID: https://blog.csdn.net/benwdm/article/details/84685292
func GetFrequency ¶ added in v2.1.37
func GetFrequency() int64
func GetLogicalCores ¶ added in v2.1.37
func GetLogicalCores() int
func GetPhysicalCores ¶ added in v2.1.37
func GetPhysicalCores() int
func GetThreadsPerCore ¶ added in v2.1.37
func GetThreadsPerCore() int
func GetVendorID ¶ added in v2.1.37
func GetVendorID() cpuid.Vendor
func GetVendorString ¶ added in v2.1.37
func GetVendorString() string
GetVendorString CPU供应商
@return e.g."Apple"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.