package sysinfo

import "github.com/google/cadvisor/utils/sysinfo"

Index

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

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

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

GetNodesInfo returns information about NUMA nodes and their topology

func GetOnlineCPUs

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

GetOnlineCPUs returns available cores.

func GetSocketFromCPU

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)

Source Files

sysinfo.go

Version
v0.52.1 (latest)
Published
Mar 5, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
3 days ago

Tools for package owners.