LinuxCommandLibrary

nvidia-smi

command-line utility for monitoring and managing NVIDIA GPU devices

TLDR

Show GPU status

$ nvidia-smi
copy
Show detailed GPU info
$ nvidia-smi -q
copy
Monitor GPU continuously
$ nvidia-smi -l [1]
copy
Show only specific GPU
$ nvidia-smi -i [0]
copy
Show processes using GPU
$ nvidia-smi pmon
copy
Query specific attributes
$ nvidia-smi --query-gpu=name,memory.total,memory.used --format=csv
copy
Set power limit (watts)
$ nvidia-smi -pl [250]
copy
Set persistence mode
$ nvidia-smi -pm [1]
copy
Reset GPU
$ nvidia-smi -r
copy
Show driver version
$ nvidia-smi --query-gpu=driver_version --format=csv,noheader
copy

SYNOPSIS

nvidia-smi [options]

DESCRIPTION

nvidia-smi (NVIDIA System Management Interface) is a command-line utility for monitoring and managing NVIDIA GPU devices. It provides information about GPU utilization, memory usage, temperature, power consumption, and running processes.
The tool can display real-time statistics, query specific GPU attributes, configure power and clock settings, and manage compute processes. It's essential for GPU monitoring in machine learning, rendering, and scientific computing environments.
nvidia-smi is included with the NVIDIA driver package and works with Tesla, Quadro, and GeForce GPUs (feature availability varies).

PARAMETERS

-l sec, --loop= sec

Continuously update every sec seconds.
-i id
Target specific GPU by index.
-q, --query
Display detailed information.
-d type
Display specific info type (MEMORY, UTILIZATION, TEMPERATURE, POWER, CLOCK).
--query-gpu= attrs
Query specific attributes.
--format= format
Output format (csv, noheader, nounits).
-pm mode
Set persistence mode (0 or 1).
-pl watts
Set power limit.
-r, --gpu-reset
Reset GPU.
pmon
Process monitoring mode.
topo
Show GPU topology.
nvlink
Show NVLink status.

QUERY ATTRIBUTES

name: GPU name
memory.total: Total memory
memory.used: Used memory
memory.free: Free memory
utilization.gpu: GPU utilization %
utilization.memory: Memory utilization %
temperature.gpu: GPU temperature
power.draw: Power consumption

CAVEATS

Requires NVIDIA proprietary drivers. Some features limited on consumer GPUs. Power management requires root. Persistence mode recommended for servers to avoid initialization delays.

HISTORY

nvidia-smi has been part of the NVIDIA driver package since the early 2000s. It evolved alongside NVIDIA's GPU computing platforms (CUDA), gaining features for monitoring compute workloads. The tool became essential with the rise of GPU computing for machine learning and scientific applications.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community