Documentation ¶
Index ¶
- Constants
- func CoreList() []int
- func CpuList() []int
- func DieList() []int
- func GetCoreHwthreads(core int) []int
- func GetDieHwthreads(die int) []int
- func GetHwthreadCore(cpuID int) int
- func GetHwthreadDie(cpuID int) int
- func GetHwthreadNumaDomain(cpuID int) int
- func GetHwthreadSocket(cpuID int) int
- func GetNumaDomainHwthreads(numaDomain int) []int
- func GetSocketHwthreads(socket int) []int
- func GetTypeList(topology_type string) []int
- func HwthreadList() []int
- func NumaNodeList() []int
- func SocketList() []int
- type CpuInformation
- type HwthreadEntry
Constants ¶
const SYSFS_CPUBASE = `/sys/devices/system/cpu`
Variables ¶
This section is empty.
Functions ¶
func CoreList ¶
func CoreList() []int
CoreList gets the list of CPU core IDs in the order of listing in /proc/cpuinfo
func CpuList ¶
func CpuList() []int
Get list of hardware thread IDs in the order of listing in /proc/cpuinfo Deprecated! Use HwthreadList()
func GetCoreHwthreads ¶
GetCoreHwthreads get all hardware thread IDs associated with a CPU core
func GetDieHwthreads ¶
GetDieHwthreads gets all hardware thread IDs associated with a CPU die
func GetHwthreadCore ¶
GetHwthreadCore gets the CPU core ID for a given hardware thread ID In case hardware thread ID is not found -1 is returned
func GetHwthreadDie ¶
GetHwthreadDie gets the CPU die ID for a given hardware thread ID In case hardware thread ID is not found -1 is returned
func GetHwthreadNumaDomain ¶
GetHwthreadNumaDomain gets the NUMA domain ID for a given hardware thread ID In case hardware thread ID is not found -1 is returned
func GetHwthreadSocket ¶
GetHwthreadSocket gets the CPU socket ID for a given hardware thread ID In case hardware thread ID is not found -1 is returned
func GetNumaDomainHwthreads ¶
GetNumaDomainHwthreads gets the all hardware thread IDs associated with a NUMA domain
func GetSocketHwthreads ¶
GetSocketHwthreads gets all hardware thread IDs associated with a CPU socket
func GetTypeList ¶
GetTypeList gets the list of specified type using the naming format inside ClusterCockpit
func HwthreadList ¶
func HwthreadList() []int
HwthreadList gets the list of hardware thread IDs in the order of listing in /proc/cpuinfo
Types ¶
type CpuInformation ¶
type CpuInformation struct { NumHWthreads int SMTWidth int NumSockets int NumDies int NumCores int NumNumaDomains int }
Structure holding basic information about a CPU
type HwthreadEntry ¶
type HwthreadEntry struct { // for each CPUx: CpuID int // CPU / hardware thread ID SMT int // Simultaneous Multithreading ID CoreCPUsList []int // CPUs within the same core Core int // Socket local core ID Socket int // Sockets (physical) ID Die int // Die ID NumaDomain int // NUMA Domain }
Structure holding all information about a hardware thread See https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-devices-system-cpu