Documentation
¶
Overview ¶
Package machineinfo provides a shim layer over gpud's machine-info package to customize version information for Fleet Intelligence.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProvider ¶
GetProvider is a passthrough to gpud's GetProvider function
func PopulatePrivateIPFromMachineInfo ¶
func PopulatePrivateIPFromMachineInfo(providerInfo *providers.Info, machineInfo *MachineInfo)
PopulatePrivateIPFromMachineInfo populates the provider's private IP from machine info if it's not already set. It uses the first private IPv4 address found.
Types ¶
type MachineInfo ¶
type MachineInfo struct {
// FleetintVersion represents the current version of Fleet Intelligence agent
FleetintVersion string `json:"fleetintVersion,omitempty"`
// GPUDriverVersion represents the current version of GPU driver installed
GPUDriverVersion string `json:"gpuDriverVersion,omitempty"`
// CUDAVersion represents the current version of cuda library.
CUDAVersion string `json:"cudaVersion,omitempty"`
// ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).
ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty"`
// Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
KernelVersion string `json:"kernelVersion,omitempty"`
// OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
OSImage string `json:"osImage,omitempty"`
// The Operating System reported by the node
OperatingSystem string `json:"operatingSystem,omitempty"`
// SystemUUID comes from https://github.com/google/cadvisor/blob/master/utils/sysfs/sysfs.go#L442
SystemUUID string `json:"systemUUID,omitempty"`
// MachineID is collected by GPUd. It comes from /etc/machine-id or /var/lib/dbus/machine-id
MachineID string `json:"machineID,omitempty"`
// BootID is collected by GPUd.
BootID string `json:"bootID,omitempty"`
// Hostname is the current host of machine
Hostname string `json:"hostname,omitempty"`
// Uptime represents when the machine up
Uptime metav1.Time `json:"uptime,omitempty"`
// CPUInfo is the CPU info of the machine.
CPUInfo *apiv1.MachineCPUInfo `json:"cpuInfo,omitempty"`
// MemoryInfo is the memory info of the machine.
MemoryInfo *apiv1.MachineMemoryInfo `json:"memoryInfo,omitempty"`
// GPUInfo is the GPU info of the machine.
GPUInfo *apiv1.MachineGPUInfo `json:"gpuInfo,omitempty"`
// DiskInfo is the Disk info of the machine.
DiskInfo *apiv1.MachineDiskInfo `json:"diskInfo,omitempty"`
// NICInfo is the network info of the machine.
NICInfo *apiv1.MachineNICInfo `json:"nicInfo,omitempty"`
}
MachineInfo is a custom struct that replaces GPUdVersion with FleetintVersion
func GetMachineInfo ¶
func GetMachineInfo(nvmlInstance nvidianvml.Instance) (*MachineInfo, error)
GetMachineInfo retrieves machine info and customizes it for Fleet Intelligence
func (*MachineInfo) RenderTable ¶
func (i *MachineInfo) RenderTable(wr io.Writer)
RenderTable renders the machine info table with Fleet Intelligence branding
Click to show internal directories.
Click to hide internal directories.