/gpustat

A simple command-line script (wrapper for nvidia-smi) for querying and monitoring GPU status

Primary LanguagePython

gpustat

Just less than nvidia-smi?

Screenshot: gpustat -cp

Usage

$ gpustat

Options:

  • --no-color : Suppress color (by default, color is enabled)
  • -u, --show-user : Display username of the process owner
  • -c, --show-cmd : Display the process name
  • -p, --show-pid : Display PID of the process

Tips

  • To periodically watch, try watch --color -n1.0 gpustat (built-in watch support will be added soon).
  • Running nvidia-smi daemon (root privilege required) will make the query much faster.

Quick Installation

Just download the script into somewhere in PATH, e.g. ~/.local/bin/:

sudo wget https://git.io/gpustat -O /usr/local/bin/gpustat
sudo chmod +x /usr/local/bin/gpustat

Status and TODOs

This script is currently in infancy, so please be patient or give me a PR :-)

  • the list of Nvidia GPUs, along with temperature/utilization/memory statistics
  • the list of running processes: PIDs, memory usage, and process name/owner
  • basic ANSI color support
  • more configurable options
  • sensible installation guide