cpu

package
v0.0.0-...-187727b Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentFrequencyKHz

func CurrentFrequencyKHz(ctx *context.Context) int

func NumPhysicalPackages

func NumPhysicalPackages(cpuInfo *ghwcpu.Info) int

"The kernel does not care about the concept of physical sockets because a socket has no relevance to software. It’s an electromechanical component. In the past a socket always contained a single package (see below), but with the advent of Multi Chip Modules (MCM) a socket can hold more than one package. So there might be still references to sockets in the code, but they are of historical nature and should be cleaned up." -- https://www.kernel.org/doc/html/v5.9/x86/topology.html#x86-topology

Types

type Info

type Info struct {
	ghwcpu.Info
	// TotalPackages is the total number of physical packages the host system
	// contains
	TotalPackages uint32 `json:"total_packages"`
	// CurrentFrequency is the processor Frequency in KHz when the information was
	// gathered. On multi-core and multi-package system this value is meaningless.
	CurrentFrequency uint32 `json:"current_frequency"`
}

func New

func New(opts ...*option.Option) (*Info, error)

Jump to

Keyboard shortcuts

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