In Operation
As you may be aware, nvidia-smi prints its results only once. nvitop can do the same with the command $ nvitop -1
. But by default the software starts in its monitoring mode.
Issuing the command $ nvitop
lets us monitor GPU usage with bar charts in addition to a process list.
We can sort the process list by GPU-INDEX, PID, USER, GPU-MEM, %SM, %CPU, %MEM and by TIME, both in ascending and descending order. We can also filter the processes so that only GPU processes with the compute context or graphics context are displayed.
For each process we can interrogate the process environment, kill or terminate the selected process, as well as toggle a tree-view screen showing the GPU processes and their parent processes.
We can change the display mode to display history graphs by pressing the f
key.
Our test machine hosts a single GPU, but the tool will display multiple GPUs if present on a system.
There’s a handy help screen (accessed by pressing the h
key in the program) which shows the keyboard shortcuts.
Summary
nvitop is our recommended tool for monitoring NVIDIA GPUs. It can run as a single instance (nvitop -1)
like nvidia-smi, or in its default monitoring mode.
Unlike some other tools, nvitop doesn’t access the output of nvidia-smi. Instead, it queries the device stats using NVML Python bindings directly. This offers efficiency gains over other similar tools.
There’s support for keyboard and mouse.
nvitop provides APIs to query the device and process status. This enables developers to integrate the tool into their applications.
This is cross-platform software running under Linux and Windows.
Website: github.com/XuehaiPan/nvitop
Support: Documentation
Developer: Xuehai Pan
License: Dual license: Apache License Version 2.0 and GNU General Public License v3.0
nvitop is written in Python. Learn Python with our recommended free books and free tutorials.
Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation / Summary
Complete list of articles in this series:
Excellent Utilities | |
---|---|
AES Crypt | Encrypt files using the Advanced Encryption Standard |
Ananicy | Shell daemon created to manage processes’ IO and CPU priorities |
broot | Next gen tree explorer and customizable launcher |
Cerebro | Fast application launcher |
cheat.sh | Community driven unified cheat sheet |
CopyQ | Advanced clipboard manager |
croc | Securely transfer files and folders from the command-line |
Deskreen | Live streaming your desktop to a web browser |
duf | Disk usage utility with more polished presentation than the classic df |
eza | A turbo-charged alternative to the venerable ls command |
Extension Manager | Browse, install and manage GNOME Shell Extensions |
fd | Wonderful alternative to the venerable find |
fkill | Kill processes quick and easy |
fontpreview | Quickly search and preview fonts |
horcrux | File splitter with encryption and redundancy |
Kooha | Simple screen recorder |
KOReader | Document viewer for a wide variety of file formats |
Imagine | A simple yet effective image optimization tool |
LanguageTool | Style and grammar checker for 30+ languages |
Liquid Prompt | Adaptive prompt for Bash & Zsh |
lnav | Advanced log file viewer for the small-scale; great for troubleshooting |
lsd | Like exa, lsd is a turbo-charged alternative to ls |
Mark Text | Simple and elegant Markdown editor |
McFly | Navigate through your bash shell history |
mdless | Formatted and highlighted view of Markdown files |
navi | Interactive cheatsheet tool |
noti | Monitors a command or process and triggers a notification |
Nushell | Flexible cross-platform shell with a modern feel |
nvitop | GPU process management for NVIDIA graphics cards |
OCRmyPDF | Add OCR text layer to scanned PDFs |
Oh My Zsh | Framework to manage your Zsh configuration |
Paperwork | Designed to simplify the management of your paperwork |
pastel | Generate, analyze, convert and manipulate colors |
PDF Mix Tool | Perform common editing operations on PDF files |
peco | Simple interactive filtering tool that's remarkably useful |
ripgrep | Recursively search directories for a regex pattern |
Rnote | Sketch and take handwritten notes |
scrcpy | Display and control Android devices |
Sticky | Simulates the traditional “sticky note” style stationery on your desktop |
tldr | Simplified and community-driven man pages |
tmux | A terminal multiplexer that offers a massive boost to your workflow |
Tusk | An unofficial Evernote client with bags of potential |
Ulauncher | Sublime application launcher |
Watson | Track the time spent on projects |
Whoogle Search | Self-hosted and privacy-focused metasearch engine |
Zellij | Terminal workspace with batteries included |