You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: pipeline: inputs: gpu-metrics: document NVIDIA NVML support and enable_nvml
- Correct intro: NVIDIA GPUs are now supported via NVML (libnvidia-ml)
- Add enable_nvml configuration option (default true)
- Add gpu_process_memory_used_bytes and gpu_mig_device_info metrics
- Note card/vendor labels (vendor: amd or nvidia)
- Split GPU detection into AMD and NVIDIA subsections
- Add enable_nvml to YAML and classic config examples
Note this action needed due to code changes without docs PR.
Signed-off-by: Eric D. Schabell <eric@schabell.org>
Copy file name to clipboardExpand all lines: pipeline/inputs/gpu-metrics.md
+32-2Lines changed: 32 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,12 @@
6
6
7
7
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.
8
8
9
-
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.
9
+
The plugin supports two GPU vendors:
10
+
11
+
-**AMD**: Metrics are read directly from the Linux `sysfs` filesystem (`/sys/class/drm/`) through the `amdgpu` kernel driver, without requiring external tools or libraries.
12
+
-**NVIDIA**: Metrics are collected through the NVIDIA Management Library (NVML) when the `libnvidia-ml` shared library from the NVIDIA driver is available. NVML collection is enabled by default and can be turned off with `enable_nvml`.
13
+
14
+
Intel GPUs aren't supported.
10
15
11
16
## Metrics collected
12
17
@@ -22,6 +27,10 @@ The plugin collects the following metrics for each detected GPU:
22
27
|`gpu_temperature_celsius`| GPU die temperature in degrees Celsius. Can be disabled with `enable_temperature` set to `false`. |
23
28
|`gpu_fan_speed_rpm`| Fan rotation speed in Revolutions per Minute (RPM). |
24
29
|`gpu_fan_pwm_percent`| Fan PWM duty cycle as a percentage (0-100). Indicates fan intensity. |
30
+
|`gpu_process_memory_used_bytes`| Per-process GPU memory usage in bytes, labeled by process ID (`pid`). NVIDIA (NVML) only. |
31
+
|`gpu_mig_device_info`| Multi-Instance GPU (MIG) device information, labeled with `parent_uuid`, `gpu_instance_id`, and `compute_instance_id`. NVIDIA (NVML) only. |
32
+
33
+
Every metric includes `card` and `vendor` labels. The `vendor` label is `amd` or `nvidia`, depending on which GPU reported the metric.
25
34
26
35
### Clock metrics
27
36
@@ -41,13 +50,16 @@ The plugin supports the following configuration parameters:
|`cards_exclude`| Pattern specifying which GPU cards to exclude from monitoring. Uses the same syntax as `cards_include`. |_none_|
43
52
|`cards_include`| Pattern specifying which GPU cards to monitor. Supports wildcards (*), ranges (0-3), and comma-separated lists (0,2,4). |`*`|
53
+
|`enable_nvml`| Enable NVIDIA GPU metrics collection through NVML (the NVIDIA Management Library). Requires the `libnvidia-ml` shared library from the NVIDIA driver to be present. |`true`|
44
54
|`enable_power`| Enable collection of power consumption metrics (`gpu_power_watts`). |`true`|
45
55
|`enable_temperature`| Enable collection of temperature metrics (`gpu_temperature_celsius`). |`true`|
46
56
|`path_sysfs`| Path to the `sysfs` root directory. Typically used for testing or non-standard systems. |`/sys`|
47
57
|`scrape_interval`| Interval in seconds between metric collection cycles. |`5`|
48
58
49
59
## GPU detection
50
60
61
+
### AMD GPUs
62
+
51
63
The GPU metrics plugin scans for any supported AMD GPU using the `amdgpu` kernel driver. Any GPU using legacy drivers is ignored.
When `enable_nvml` is `true` (the default), the plugin detects NVIDIA GPUs through NVML, provided the `libnvidia-ml` shared library from the NVIDIA driver is installed. If the library isn't present, NVML collection is skipped and a message is logged.
81
+
82
+
To confirm your NVIDIA driver and GPUs are visible run:
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.
96
+
In systems with multiple GPUs, the GPU metrics plugin detects all supported AMD and NVIDIA cards by default. You can control which GPUs you want to monitor with the `cards_include` and `cards_exclude` parameters.
69
97
70
98
To list the GPUs running in your system run the following command:
0 commit comments