Documentation ¶
Overview ¶
Package cpu regroups collecting information about the CPU
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cpu ¶
type Cpu struct { // VendorId the CPU vendor ID VendorId string // ModelName the CPU model ModelName string // CpuCores the number of cores for the CPU CpuCores uint64 // CpuLogicalProcessors the number of logical core for the CPU CpuLogicalProcessors uint64 // Mhz the frequency for the CPU (Not available on ARM) Mhz float64 // CacheSizeBytes the cache size for the CPU (Linux only) CacheSizeBytes uint64 // Family the CPU family Family string // Model the CPU model name Model string // Stepping the CPU stepping Stepping string // CpuPkgs the CPU pkg count (Windows only) CpuPkgs uint64 // CpuNumaNodes the CPU numa node count (Windows only) CpuNumaNodes uint64 // CacheSizeL1Bytes the CPU L1 cache size (Windows only) CacheSizeL1Bytes uint64 // CacheSizeL2Bytes the CPU L2 cache size (Windows only) CacheSizeL2Bytes uint64 // CacheSizeL3 the CPU L3 cache size (Windows only) CacheSizeL3Bytes uint64 }
Cpu holds metadata about the host CPU
func Get ¶
Get returns a CPU struct already initialized, a list of warnings and an error. The method will try to collect as much metadata as possible, an error is returned if nothing could be collected. The list of warnings contains errors if some metadata could not be collected.
Click to show internal directories.
Click to hide internal directories.