mirror of
https://github.com/nicolargo/glances.git
synced 2026-09-18 00:01:40 -04:00
On Jetson (Tegra) the integrated GPU is enumerated by NVML (nvidia-l4t-nvml) and reports its name (e.g. "Orin (nvgpu)"), but the per-metric NVML queries return NVML_ERROR_NOT_SUPPORTED, so the GPU plugin only ever showed N/A for proc/mem/temperature. Add a Tegra sysfs backend (glances/plugins/gpu/cards/tegra.py) and wire it into the NVIDIA card as a per-metric fallback: when NVML returns None for a device detected as Tegra (name contains "nvgpu", or the Tegra GPU sysfs node exists), read: - proc: /sys/devices/platform/gpu.0/load (per-mille -> percent) - temperature: the gpu-thermal /sys/class/thermal zone (milli-C -> C) Memory stays N/A by design: the Tegra GPU shares system RAM, already reported by the MEM plugin. Scales verified against tegrastats (GR3D_FREQ and gpu@). Adds unit tests with committed sysfs fixtures, a NEWS.rst entry and a docs note. Verified on JetPack 6.2.1 (L4T R36.4.7) and JetPack 7.2 (L4T R39.2): identical sysfs node layout and gpu-thermal zone selection on both, with temperature cross-checked against tegrastats on each. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
72 lines
2.0 KiB
ReStructuredText
72 lines
2.0 KiB
ReStructuredText
.. _gpu:
|
|
|
|
GPU
|
|
===
|
|
|
|
For the moment, following GPU are supported:
|
|
- NVidia (thanks to the `nvidia-ml-py`_ library)
|
|
- NVidia Jetson / Tegra integrated GPU (NVML reports the device but not its
|
|
telemetry, so usage and temperature are read from Tegra sysfs)
|
|
- AMD (only on Linux Operating system with kernel 5.14 or higher)
|
|
- Intel (only on Linux Operating system)
|
|
- ARM (only on Linux Operating system with kernel 6.0 or higher;
|
|
drivers: msm/Adreno, Panfrost, Panthor, v3d, Lima, Etnaviv)
|
|
|
|
The GPU stats are shown as a percentage of value and for the configured
|
|
refresh time. It displays:
|
|
|
|
- GPU usage (NVidia, AMD and ARM) or frequency (Intel)
|
|
- memory consumption (NVidia, AMD, and ARM when exposed by fdinfo)
|
|
- temperature (if available)
|
|
|
|
.. note::
|
|
For ``panthor`` and ``panfrost``, per-engine sampling
|
|
(``drm-engine-*`` and ``drm-cycles-*`` fdinfo counters) is disabled
|
|
by default to save power. Enable it via sysfs:
|
|
|
|
.. code-block:: bash
|
|
|
|
echo 1 > /sys/bus/platform/drivers/panthor/*.gpu/profiling
|
|
echo 1 > /sys/bus/platform/drivers/panfrost/*.gpu/profiling
|
|
|
|
.. image:: ../_static/gpu.png
|
|
|
|
If you click on the ``6`` short key, the per-GPU view is displayed:
|
|
|
|
.. image:: ../_static/pergpu.png
|
|
|
|
.. note::
|
|
You can also start Glances with the ``--meangpu`` option to display
|
|
the first view by default.
|
|
|
|
You can change the threshold limits in the configuration file:
|
|
|
|
.. code-block:: ini
|
|
|
|
[gpu]
|
|
# Default processor values if not defined: 50/70/90
|
|
proc_careful=50
|
|
proc_warning=70
|
|
proc_critical=90
|
|
# Default memory values if not defined: 50/70/90
|
|
mem_careful=50
|
|
mem_warning=70
|
|
mem_critical=90
|
|
# Temperature
|
|
temperature_careful=60
|
|
temperature_warning=70
|
|
temperature_critical=80
|
|
|
|
Legend:
|
|
|
|
============== ============
|
|
GPU (PROC/MEM) Status
|
|
============== ============
|
|
``<50%`` ``OK``
|
|
``>50%`` ``CAREFUL``
|
|
``>70%`` ``WARNING``
|
|
``>90%`` ``CRITICAL``
|
|
============== ============
|
|
|
|
.. _nvidia-ml-py: https://pypi.org/project/nvidia-ml-py/
|