sysinfo

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HugepageSize2Mi = 2048
	HugepageSize1Gi = 1048576
)
View Source
const (
	SysDevicesNode = "/sys/devices/system/node"
)

Variables

This section is empty.

Functions

func GetMemory added in v0.2.2

func GetMemory(hnd Handle) (map[int]int64, error)

func GetMemoryResourceCounters added in v0.2.2

func GetMemoryResourceCounters(hnd Handle) (map[string]PerNUMACounters, error)

func HugepageResourceNameFromSize

func HugepageResourceNameFromSize(sizeKB int) string

func MemoryForNode added in v0.2.2

func MemoryForNode(hnd Handle, nodeID int) (int64, error)

Types

type Handle

type Handle struct {
	Root string
}

func (Handle) SysDevicesNodes

func (hnd Handle) SysDevicesNodes() string

func (Handle) SysDevicesNodesNodeNth

func (hnd Handle) SysDevicesNodesNodeNth(nodeID int) string

type Hugepages

type Hugepages struct {
	NodeID int
	SizeKB int
	Total  int
}

TODO review

func GetHugepages

func GetHugepages(hnd Handle) ([]Hugepages, error)

func HugepagesForNode

func HugepagesForNode(hnd Handle, nodeID int) ([]Hugepages, error)

type PerNUMACounters

type PerNUMACounters map[int]int64

Jump to

Keyboard shortcuts

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