machineinfo

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package machineinfo provides information about the machine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGossipRequest

func CreateGossipRequest(machineID string, nvmlInstance nvidianvml.Instance) (*apiv1.GossipRequest, error)

func CreateLoginRequest

func CreateLoginRequest(token string, machineID string, nodeGroup string, gpuCount string, nvmlInstance nvidianvml.Instance) (*apiv1.LoginRequest, error)

func GetMachineCPUInfo

func GetMachineCPUInfo() *apiv1.MachineCPUInfo

func GetMachineDiskInfo

func GetMachineDiskInfo(ctx context.Context) (*apiv1.MachineDiskInfo, error)

func GetMachineGPUInfo

func GetMachineGPUInfo(nvmlInstance nvidianvml.Instance) (*apiv1.MachineGPUInfo, error)

func GetMachineInfo

func GetMachineInfo(nvmlInstance nvidianvml.Instance) (*apiv1.MachineInfo, error)

func GetMachineLocation

func GetMachineLocation() *apiv1.MachineLocation

func GetMachineMemoryInfo

func GetMachineMemoryInfo() *apiv1.MachineMemoryInfo

func GetMachineNICInfo

func GetMachineNICInfo() *apiv1.MachineNICInfo

func GetProvider

func GetProvider(publicIP string) *providers.Info

GetProvider looks up the provider of the machine. If the metadata service or other provider detection fails, it falls back to ASN lookup using the public IP address.

func GetSystemResourceGPUCount

func GetSystemResourceGPUCount(nvmlInstance nvidianvml.Instance) (string, error)

GetSystemResourceGPUCount returns the system GPU resource of the machine with the GPU count, using the type defined in "corev1.ResourceName" in https://pkg.go.dev/k8s.io/api/core/v1#ResourceName. It represents the GPU count with the key "nvidia.com/gpu" or "nvidia.com/gpu.count". Must be parsed using the "resource.ParseQuantity" function in https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource.

This is different from the device count in DCGM. ref. "CountDevEntry" in "nvvs/plugin_src/software/Software.cpp" ref. https://github.com/NVIDIA/DCGM/blob/903d745504f50153be8293f8566346f9de3b3c93/nvvs/plugin_src/software/Software.cpp#L220-L249

func GetSystemResourceRootVolumeTotal

func GetSystemResourceRootVolumeTotal() (string, error)

GetSystemResourceRootVolumeTotal returns the system root disk resource of the machine for the total disk size, using the type defined in "corev1.ResourceName" in https://pkg.go.dev/k8s.io/api/core/v1#ResourceName. It represents the Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024). Must be parsed using the "resource.ParseQuantity" function in https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource.

Types

This section is empty.

Jump to

Keyboard shortcuts

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