Documentation ¶
Overview ¶
Package hwinfo gathers hardware information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreInfo ¶
type CoreInfo struct { ID int // logical core ID NumaSocket int // NUMA socket number PhysicalKey int // physical core key, same value for hyper-threads on a physical core }
CoreInfo describes a logical CPU core.
type Cores ¶
type Cores []CoreInfo
Cores contains information about CPU cores.
func (Cores) ByNumaSocket ¶
ByNumaSocket classifies cores as map[NumaSocket]Cores.
func (Cores) ListPrimary ¶
ListPrimary returns a list of logical cores that are the first logical core in each physical core.
func (Cores) ListSecondary ¶
ListSecondary returns a list of logical cores that are not in ListPrimary().
func (Cores) MaxNumaSocket ¶
MaxNumaSocket determines the maximum NUMA socket.
Click to show internal directories.
Click to hide internal directories.