$linuxjunkies
>

gpustat(1)

Display GPU utilization and memory usage for NVIDIA GPUs in a formatted table.

UbuntuDebianFedoraArch

Synopsis

gpustat [OPTION]... [--watch | --json]

Description

gpustat monitors NVIDIA GPU status including utilization percentage, memory consumption, temperature, and running processes. It provides a quick overview similar to nvidia-smi but with a cleaner, more readable output format.

The tool displays real-time GPU metrics in a table format, showing per-GPU stats and the processes running on each GPU. It requires NVIDIA drivers and the NVIDIA Management Library (NVML) to be installed.

Common options

FlagWhat it does
--watchRefresh display every second (continuous monitoring mode)
--watch-colorUse colors in watch mode for better readability
--jsonOutput data in JSON format instead of formatted table
-c, --no-colorDisable colored output
-p, --show-pidShow process IDs (PIDs) of GPU processes
-a, --show-all-processesShow all GPU processes instead of just the top ones
-n, --new-formatUse new output format with enhanced layout
-i GPUS, --gpuids GPUSSpecify which GPUs to monitor (comma-separated list)
--no-headerHide column headers from output
-u, --unitSpecify memory unit (MB or GB)

Examples

Show current GPU status once with a clean formatted table

gpustat

Continuously monitor GPU status, updating every second (press Ctrl+C to exit)

gpustat --watch

Monitor GPUs in watch mode with color-coded output for better visibility

gpustat --watch-color

Output GPU statistics in JSON format for parsing by scripts or tools

gpustat --json

Display GPU status with process IDs of running GPU-accelerated applications

gpustat -p

Show status only for GPUs 0 and 1 (useful on systems with many GPUs)

gpustat -i 0,1

Log GPU status without color codes to a file for archival or analysis

gpustat --no-color | tee gpu_log.txt

Monitor GPU status every 2 seconds using the watch command without header repetition

watch -n 2 gpustat --no-header

Related commands