system

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UbuntuOsName = "ubuntu"
	RhelOsName   = "rhel"
	AmazonOsName = "amzn"

	UbuntuResolvConfPath = "/run/systemd/resolve/resolv.conf"
)

Variables

This section is empty.

Functions

func GetFipsInfo

func GetFipsInfo() (bool, bool, error)

Returns whether FIPS module is both installed an enabled on the system

ipsInstalled, fipsEnabled, err := getFipsInfo()

func GetMachineMemoryCapacity

func GetMachineMemoryCapacity() (uint64, error)

GetMachineMemoryCapacity returns the machine's total memory from /proc/meminfo. Returns the total memory capacity as number of bytes.

func GetMilliNumCores

func GetMilliNumCores() (int, error)

GetMilliNumCores this is a striped version of GetNodesInfo that only get information for NumCores https://github.com/google/cadvisor/blob/master/utils/sysinfo/sysinfo.go#L203

func GetOsName

func GetOsName() string

GetOsName reads the /etc/os-release file and returns the os name

func GetVersionCodeName

func GetVersionCodeName() string

func IsCPUOnline

func IsCPUOnline(cpuID int) bool

func NewNetworkingAspect

func NewNetworkingAspect(cfg *api.NodeConfig) *networkingAspect

NewNetworkingAspect constructs new networkingAspect.

Types

type SystemAspect

type SystemAspect interface {
	Name() string
	Setup() error
}

func NewLocalDiskAspect

func NewLocalDiskAspect(cfg *api.NodeConfig) SystemAspect

func NewPortsAspect

func NewPortsAspect(cfg *api.NodeConfig, logger *zap.Logger) SystemAspect

func NewSwapAspect

func NewSwapAspect(cfg *api.NodeConfig, logger *zap.Logger) SystemAspect

func NewSysctlAspect

func NewSysctlAspect(cfg *api.NodeConfig) SystemAspect

Jump to

Keyboard shortcuts

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