pub struct GpuMetrics {Show 13 fields
pub uuid: String,
pub name: String,
pub device_type: String,
pub host_id: String,
pub detail: HashMap<String, String>,
pub utilization_pct: f64,
pub vram_total_bytes: u64,
pub vram_used_bytes: u64,
pub vram_used_pct: f64,
pub temperature_celsius: u32,
pub power_watts: f64,
pub frequency_mhz: u32,
pub core_count: Option<u32>,
}Expand description
Per-GPU metrics sourced from all-smi (NVIDIA NVML / AMD / TPU / …). Populated only when a supported GPU library is detected at runtime; an empty Vec means no GPUs are present or no driver is installed.
Fields§
§uuid: StringVendor-assigned device UUID (stable across reboots for physical GPUs).
name: StringHuman-readable device name, e.g. “NVIDIA GeForce RTX 4090”.
device_type: StringDevice class reported by all-smi: “GPU”, “NPU”, “TPU”, etc. Equivalent to the “kind” of accelerator.
host_id: StringHost-level device identifier (slot, bus address, or platform index).
detail: HashMap<String, String>Additional platform-specific identity fields keyed by the driver. For NVIDIA these typically include PCI device/vendor IDs and the driver version; for AMD, the ASIC name and PCIe topology; for TPU, the chip revision. Keys and values vary by vendor.
utilization_pct: f64Core utilisation (0.0–100.0).
vram_total_bytes: u64Total VRAM in bytes.
vram_used_bytes: u64Used VRAM in bytes.
vram_used_pct: f64Fraction of VRAM in use (0.0–100.0).
temperature_celsius: u32Die temperature in degrees Celsius.
power_watts: f64Power draw in watts.
frequency_mhz: u32Core clock frequency in MHz.
core_count: Option<u32>Number of shader/compute cores, if reported by the driver.
Trait Implementations§
Source§impl Clone for GpuMetrics
impl Clone for GpuMetrics
Source§fn clone(&self) -> GpuMetrics
fn clone(&self) -> GpuMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more