Tools for monitoring NVIDIA GPUs on Linux
Tools for monitoring NVIDIA GPUs on Linux
This repository has been deprecated with the underlying components moved to their own repositories as noted below. The repository has also been archived; setting it to readonly.
This repository contains Golang bindings and DCGM-Exporter for gathering GPU telemetry in Kubernetes.
** NOTE: NVML Go bindings have moved to github.com. The NVML Go bindings in this repo are no longer maintained.
** July 2021 - Update #1: The DCGM Go bindings have moved to github.com. The DCGM bindings in this repo are no longer maintained and will eventually be removed.
** June 2021 - NOTICE: Some of the tools in this repository are graduating to their own repos. In the next few weeks both the DCGM Go bindings and the DCGM Exporter will be migrating to github.com/NVIDIA. This will allow for independent versioning, issues, MRs, etc. Efforts will be made to review the existing MRs and issues before the migration occurs.**
Golang bindings are provided for the following two libraries:
You will also find samples for both of these bindings in this repository.
The repository also contains DCGM-Exporter. It exposes GPU metrics exporter for Prometheus leveraging NVIDIA DCGM.
To gather metrics on a GPU node, simply start the dcgm-exporter container:
…Note: Consider using the NVIDIA GPU Operator rather than DCGM-Exporter directly.
Ensure you have already setup your cluster with the default runtime as NVIDIA.
The recommended way to install DCGM-Exporter is to use the Helm chart:
$ helm repo add gpu-helm-charts \
https://nvidia.github.io/gpu-monitoring-tools/helm-chartsUpdate the repo:
$ helm repo updateAnd install the chart:
$ helm install \
--generate-name \
gpu-helm-charts/dcgm-exporterOnce the dcgm-exporter pod is deployed, you can use port forwarding to obtain metrics quickly:
…To integrate DCGM-Exporter with Prometheus and Grafana, see the full instructions in the user guide.
dcgm-exporter is deployed as part of the GPU Operator. To get started with integrating with Prometheus, check the Operator user guide.
dcgm-exporter is actually fairly straightforward to build and use.
Ensure you have the following:
…With dcgm-exporter you can configure which fields are collected by specifying a custom CSV file.
You will find the default CSV file under etc/dcgm-exporter/default-counters.csv in the repository, which is copied on your system or container at
/etc/dcgm-exporter/default-counters.csv
The format of this file is pretty straightforward:
# Format,,
# If line starts with a '#' it is considered a comment,,
# DCGM FIELD, Prometheus metric type, help message
# Clocks,,
DCGM_FI_DEV_SM_CLOCK, gauge, SM clock frequency (in MHz).
DCGM_FI_DEV_MEM_CLOCK, gauge, Memory clock frequency (in MHz).A custom csv file can be specified using the -f option or --collectors as follows:
$ dcgm-exporter -f /tmp/custom-collectors.csvNotes:
You can find the official NVIDIA DCGM-Exporter dashboard here: https://grafana.com/grafana/dashboards/12239
You will also find the json file on this repo under grafana/dcgm-exporter-dashboard.json
Pull requests are accepted!
Checkout the Contributing document!
No open issues yet, or sync has not completed.