sysinfo

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 361

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlockDeviceInfo

func GetBlockDeviceInfo(sysfs sysfs.SysFs) (map[string]info.DiskInfo, error)

Get information about block devices present on the system. Uses the passed in system interface to retrieve the low level OS information.

func GetCacheInfo

func GetCacheInfo(sysFs sysfs.SysFs, id int) ([]sysfs.CacheInfo, error)

GetCacheInfo return information about a cache accessible from the given cpu thread

func GetHugePagesInfo added in v0.37.0

func GetHugePagesInfo(sysFs sysfs.SysFs, hugepagesDirectory string) ([]info.HugePagesInfo, error)

GetHugePagesInfo returns information about pre-allocated huge pages hugepagesDirectory should be top directory of hugepages Such as: /sys/kernel/mm/hugepages/

func GetNetworkDevices

func GetNetworkDevices(sysfs sysfs.SysFs) ([]info.NetInfo, error)

Get information about network devices present on the system.

func GetNodesInfo added in v0.37.0

func GetNodesInfo(sysFs sysfs.SysFs) ([]info.Node, int, error)

GetNodesInfo returns information about NUMA nodes and their topology

func GetOnlineCPUs added in v0.38.0

func GetOnlineCPUs(topology []info.Node) []int

GetOnlineCPUs returns available cores.

func GetSocketFromCPU added in v0.37.0

func GetSocketFromCPU(topology []info.Node, cpu int) int

GetSocketFromCPU returns Socket ID of passed CPU. If is not present, returns -1.

func GetSystemUUID

func GetSystemUUID(sysFs sysfs.SysFs) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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