sysfs

package
v0.0.0-...-f2e4893 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: BSD-2-Clause-Patent Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

SysfsProvider provides system information from sysfs.

func NewProvider

func NewProvider(log logging.Logger) *Provider

NewProvider creates a new SysfsProvider.

func (*Provider) GetFabricInterfaces

func (s *Provider) GetFabricInterfaces(ctx context.Context, provider string) (*hardware.FabricInterfaceSet, error)

GetFabricInterfaces harvests fabric interfaces from sysfs.

func (*Provider) GetNetDevClass

func (s *Provider) GetNetDevClass(dev string) (hardware.NetDevClass, error)

GetNetDevClass fetches the network device class for the given network interface.

func (*Provider) GetNetDevState

func (s *Provider) GetNetDevState(iface string) (hardware.NetDevState, error)

GetNetDevState fetches the state of a network interface.

func (*Provider) GetTopology

func (s *Provider) GetTopology(ctx context.Context) (*hardware.Topology, error)

GetTopology builds a topology from the contents of sysfs.

func (*Provider) IsIOMMUEnabled

func (s *Provider) IsIOMMUEnabled() (bool, error)

IsIOMMUEnabled checks whether IOMMU is enabled by interrogating files in sysfs and implements the IOMMUDetector interface on sysfs provider.

func (*Provider) IsTHPEnabled

func (s *Provider) IsTHPEnabled() (bool, error)

IsTHPEnabled checks whether transparent hugepages is enabled by interrogating sysfs and implements the THPDetector interface on sysfs provider.

Jump to

Keyboard shortcuts

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