GPU metrics

The gpu_metrics input plugin collects graphics processing unit (GPU) performance metrics from graphics cards on Linux systems. It provides real-time monitoring of GPU utilization, memory usage (VRAM), clock frequencies, power consumption, temperature, and fan speeds.

The plugin reads metrics directly from the Linux sysfs filesystem (/sys/class/drm/) without requiring external tools or libraries. Only AMD GPUs are supported through the amdgpu kernel driver. NVIDIA and Intel GPUs aren't supported.

Metrics collected

The plugin collects the following metrics for each detected GPU:

Key
Description

gpu_utilization_percent

GPU core utilization as a percentage (0 to 100). Indicates how busy the GPU is when processing workloads.

gpu_memory_used_bytes

Amount of video RAM (VRAM) currently in use, measured in bytes.

gpu_memory_total_bytes

Total video RAM (VRAM) capacity available on the GPU, measured in bytes.

gpu_clock_mhz

Current GPU clock frequency in MHz. This metric has multiple instances with different type labels (see Clock metrics).

gpu_power_watts

Current power consumption in watts. Can be disabled with enable_power set to false.

gpu_temperature_celsius

GPU die temperature in degrees Celsius. Can be disabled with enable_temperature set to false.

gpu_fan_speed_rpm

Fan rotation speed in Revolutions per Minute (RPM).

gpu_fan_pwm_percent

Fan PWM duty cycle as a percentage (0-100). Indicates fan intensity.

Clock metrics

The gpu_clock_mhz metric is reported separately for three clock domains:

Type
Description

graphics

GPU core/shader clock frequency.

memory

VRAM clock frequency.

soc

System-on-chip clock frequency.

Configuration parameters

The plugin supports the following configuration parameters:

Key
Description
Default

cards_exclude

Pattern specifying which GPU cards to exclude from monitoring. Uses the same syntax as cards_include.

none

cards_include

Pattern specifying which GPU cards to monitor. Supports wildcards (*), ranges (0-3), and comma-separated lists (0,2,4).

*

enable_power

Enable collection of power consumption metrics (gpu_power_watts).

true

enable_temperature

Enable collection of temperature metrics (gpu_temperature_celsius).

true

path_sysfs

Path to the sysfs root directory. Typically used for testing or non-standard systems.

/sys

scrape_interval

Interval in seconds between metric collection cycles.

5

GPU detection

The GPU metrics plugin scans for any supported AMD GPU using the amdgpu kernel driver. Any GPU using legacy drivers is ignored.

To check if your AMD GPU will be detected run:

Example output:

Multiple GPU systems

In systems with multiple GPUs, the GPU metrics plugin will detect all AMD cards by default. You can control which GPUs you want to monitor with the cards_include and cards_exclude parameters.

To list the GPUs running in your system run the following command:

Example output:

Getting started

To get GPU metrics from your system, you can run the plugin from either the command line or through the configuration file:

Command line

Run the following command from the command line:

Example output:

Configuration file

In your main configuration file append the following:

Last updated

Was this helpful?