Linux command
nvidia-smi 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show GPU status
nvidia-smi
Show detailed GPU info
nvidia-smi -q
Monitor GPU continuously
nvidia-smi -l [1]
Show only specific GPU
nvidia-smi -i [0]
Show processes using GPU
nvidia-smi pmon
Query specific attributes
nvidia-smi --query-gpu=name,memory.total,memory.used --format=csv
Set power limit
nvidia-smi -pl [250]
Set persistence mode
nvidia-smi -pm [1]
Reset GPU
nvidia-smi -r
Show driver version
nvidia-smi --query-gpu=driver_version --format=csv,noheader
说明
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).
参数
- -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.
FAQ
What is the nvidia-smi command used for?
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).
How do I run a basic nvidia-smi example?
Run `nvidia-smi` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -l _sec_, --loop= _sec_ do in nvidia-smi?
Continuously update every sec seconds.