NvidiaGpu

Struct NvidiaGpu 

Source
pub struct NvidiaGpu {
    pub device_count: u32,
    pub processes: u32,
    pub gpu_time: u32,
    pub mem_time: u32,
    pub mem_total: u64,
    pub mem_free: u64,
    pub ecc_errors: u32,
    pub energy: u32,
    pub temperature: u32,
    pub fan_speed: u32,
}
Expand description

NVIDIA GPU Statistics - Format (5703,1)

GPU performance metrics from NVIDIA Management Library (NVML)

§XDR Definition (sFlow NVML)

/* NVIDIA GPU statistics */
/* opaque = counter_data; enterprise = 5703; format = 1 */
struct nvidia_gpu {
  unsigned int device_count; /* see nvmlDeviceGetCount */
  unsigned int processes;    /* see nvmlDeviceGetComputeRunningProcesses */
  unsigned int gpu_time;     /* total milliseconds in which one or more
                                kernels was executing on GPU
                                sum across all devices */
  unsigned int mem_time;     /* total milliseconds during which global device
                                memory was being read/written
                                sum across all devices */
  unsigned hyper mem_total;  /* sum of framebuffer memory across devices
                                see nvmlDeviceGetMemoryInfo */
  unsigned hyper mem_free;   /* sum of free framebuffer memory across devices
                                see nvmlDeviceGetMemoryInfo */
  unsigned int ecc_errors;   /* sum of volatile ECC errors across devices
                                see nvmlDeviceGetTotalEccErrors */
  unsigned int energy;       /* sum of millijoules across devices
                                see nvmlDeviceGetPowerUsage */
  unsigned int temperature;  /* maximum temperature in degrees Celsius
                                across devices
                                see nvmlDeviceGetTemperature */
  unsigned int fan_speed;    /* maximum fan speed in percent across devices
                                see nvmlDeviceGetFanSpeed */
}

ERRATUM: The specification uses a comma instead of a semicolon in the format comment (enterprise = 5703, format=1 should be enterprise = 5703; format = 1), which is inconsistent with all other sFlow specifications. The corrected version is shown above.

Fields§

§device_count: u32

Number of GPU devices

§processes: u32

Number of running compute processes

§gpu_time: u32

Total GPU time in milliseconds (sum across all devices)

§mem_time: u32

Total memory access time in milliseconds (sum across all devices)

§mem_total: u64

Total framebuffer memory in bytes (sum across all devices)

§mem_free: u64

Free framebuffer memory in bytes (sum across all devices)

§ecc_errors: u32

Sum of volatile ECC errors across all devices

§energy: u32

Total energy consumption in millijoules (sum across all devices)

§temperature: u32

Maximum temperature in degrees Celsius across all devices

§fan_speed: u32

Maximum fan speed in percent across all devices

Trait Implementations§

Source§

impl Clone for NvidiaGpu

Source§

fn clone(&self) -> NvidiaGpu

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NvidiaGpu

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for NvidiaGpu

Source§

fn eq(&self, other: &NvidiaGpu) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for NvidiaGpu

Source§

impl StructuralPartialEq for NvidiaGpu

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.