hardware

package
v0.43.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	PCI_ADDRESS_PATTERN = `^([\da-fA-F]{4}):([\da-fA-F]{2}):([\da-fA-F]{2})\.([0-7]{1})$`
)

Variables

This section is empty.

Functions

func GetNumberOfVCPUs added in v0.12.0

func GetNumberOfVCPUs(cpuSpec *v1.CPU) int64

GetNumberOfVCPUs returns number of vCPUs It counts sockets*cores*threads

func ParseCPUSetLine

func ParseCPUSetLine(cpusetLine string) (cpusList []int, err error)

Parse linux cpuset into an array of ints See: http://man7.org/linux/man-pages/man7/cpuset.7.html#FORMATS

func ParsePciAddress added in v0.38.0

func ParsePciAddress(pciAddress string) ([]string, error)

ParsePciAddress returns an array of PCI DBSF fields (domain, bus, slot, function)

Types

This section is empty.

Jump to

Keyboard shortcuts

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