Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SysCPU is the path to cpu devices in linux SysCPU = "/sys/devices/system/cpu" // CPUInfoPath is the path to cpu info in /proc CPUInfoPath = "/proc/cpuinfo" )
Variables ¶
This section is empty.
Functions ¶
func GetSignature ¶
func GetSignature() uint32
GetSignature returns Signature of the processor ignore stepping and processor type. NOTE, Guess all cpus in one hose are same microarch
func HostCPUNum ¶
func HostCPUNum() int
HostCPUNum returns the total cpu number of host REF: https://www.kernel.org/doc/Documentation/cputopology.txt another way is call sysconf via cgo, like libpqos
func IsolatedCPUs ¶
func IsolatedCPUs() string
IsolatedCPUs returns isolated CPUs. The result will be as follow: 2-21,24-43,46-65,68-87 This result can generate a Bitmap
func LocateOnNode ¶
LocateOnNode return the cpus on which node.
func LocateOnSocket ¶
LocateOnSocket return the cpus on which socket.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.