An NVIDIA SMI'esk GPU Monitoring tool for your terminal.

Overview

NVTOP

img

An NVIDIA SMI'esk GPU Monitoring tool for your terminal.

art by stable-diffusion + Maz

Contents:

nvtop is a command-line utility that provides a replacement for some of the output from nvidia-smi (System Management Interface). It offers real-time monitoring and visualization of GPU information: Core Clock, Temps, Fanspeed and Memory Usage.


Usage:

  • Control the rate at which you're polling the GPU(s) for info:
# Monitor the GPU and system with a 1-second update interval
nvtop --delay 1000
  • Go with the default 1s update speed :
# 1-second just so happens to be the default so, if you're happy with that you can just run:
nvtop
  • If you're having trouble, send us a log!
# The app can log debug info
nvtop --log <PATH TO CREATE A LOGFILE @>

Prerequisites

Before installing nvtop, ensure that you have Rust and Cargo (the Rust package manager) installed on your system. You can download and install Rust from the official website: Rust Downloads.

You will also need to at least confirm that nvidia-smi (The official NVIDIA tool that this one seeks to mimic) works. Why? Because, not all of the functionality from nvmlt-sys the library this app relies on does not guarantee all reporting functionality across ALL NVIDIA gpus.

Installation

Install via Cargo

You can install nvtop directly from Cargo. Follow these steps:

  1. Build and install nvtop from GitHub:

    cargo install nvtop
    # or for the latest you can use a git url, 
    cargo install --git https://github.com/alphastrata/nvtop

Build manually

To build nvtop from the source code, you can follow these steps:

  1. Download the source code or clone the repository to your local machine:

    git clone https://github.com/alphastrata/nvtop
  2. Change to the nvtop directory:

    cd nvtop
  3. Build the project using Cargo:

    cargo build --release
    # the binary will be available at ./target/release/nvtop
  4. After building, you can find the nvtop executable in the target/release/ directory.

Install build artifact

To make nvtop easily accessible from the command line, you can copy the executable to a directory in your system's PATH. For example, you can copy it to /usr/local/bin/:

sudo install -Dm755 target/release/nvtop /usr/local/bin/nvtop

Now, you can use nvtop from anywhere in your terminal.


Why?

because _this:

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.113.01             Driver Version: 535.113.01   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA TITAN RTX               Off | 00000000:0A:00.0  On |                  N/A |
| 41%   44C    P0              67W / 280W |   1367MiB / 24576MiB |      2%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1008      G   /usr/lib/Xorg                               439MiB |
+---------------------------------------------------------------------------------------+

is boring, and this: nvtop

is fun!


Troubleshooting:

  • If something ain't working please feel free to open an issue, before doing so however, the app has the ability to do some verbose logging (to disk): nvtop --log

  • This, by default will make an nvtop.log wherever your binary is, include that with your bug report (there's Issue templates).


Contributing:

  • All are welcome, I'm not really too fussy about coding standards etc (when I'm not at work :p)

Advice for contributors:

  • if you touch the readme, please format it with mdformat (pip install mdformat).
  • if you touch python scrpits, please format them with black (pip install black).
  • always run these cargo test, cargo check, cargo clippy -- please don't make PRs until any issues those tools flag are resolved.
  • if this is your first time contributing to open source, wow! thank you.
You might also like...
Wonnx - a GPU-accelerated ONNX inference run-time written 100% in Rust, ready for the web

Wonnx is a GPU-accelerated ONNX inference run-time written 100% in Rust, ready for the web. Supported Platforms (enabled by wgpu) API Windows Linux &

A gpu accelerated (optional) neural network Rust crate.

Intricate A GPU accelerated library that creates/trains/runs neural networks in pure safe Rust code. Architechture overview Intricate has a layout ver

A repo for learning how to parallelize computations in the GPU using Apple's Metal, in Rust.

Metal playground in rust Made for learning how to parallelize computations in the GPU using Apple's Metal, in Rust, via the metal crate. Overview The

LLaMa 7b with CUDA acceleration implemented in rust. Minimal GPU memory needed!

LLaMa 7b in rust This repo contains the popular LLaMa 7b language model, fully implemented in the rust programming language! Uses dfdx tensors and CUD

A fun, hackable, GPU-accelerated, neural network library in Rust, written by an idiot

Tensorken: A Fun, Hackable, GPU-Accelerated, Neural Network library in Rust, Written by an Idiot (work in progress) Understanding deep learning from t

A library implementing GPU-accelerated cryptographic functionality for the zkSync prover.
A library implementing GPU-accelerated cryptographic functionality for the zkSync prover.

zkSync Era: A ZK Rollup For Scaling Ethereum zkSync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on

Signed distance functions + Rust (CPU & GPU) = ❤️❤️
Signed distance functions + Rust (CPU & GPU) = ❤️❤️

sdf-playground Signed distance functions + Rust (CPU & GPU) = ❤️❤️ Platforms: Windows, Mac & Linux. About sdf-playground is a demo showcasing how you

rust-gpu CLI driver

rust-gpu-driver Experiment to make rust-gpu more accessible as a GPU shading language in various projects. DISCLAIMER: This is an unstable experiment

Ask the Terminal Anything (ATA): ChatGPT in the terminal

ata: Ask the Terminal Anything ChatGPT in the terminal TIP: Run a terminal with this tool in your background and show/hide it with a keypress. This ca

Comments
  • Panic - thread 'main' panicked at 'Ratio should be between 0 and 1 inclusively.'

    Panic - thread 'main' panicked at 'Ratio should be between 0 and 1 inclusively.'

    Built from source. Unable to run the program. thread 'main' panicked at 'Ratio should be between 0 and 1 inclusively.' ..../.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/widgets/gauge.rs:62:9 note: run withRUST_BACKTRACE=1environment variable to display a backtrace

    I should probably also note that I'm running this with hybrid graphics enabled, and connected to a power supply.

    bug 
    opened by ltrook21 14
  • Dev

    Dev

    • new banner :p
    • misc fixes to text readability (black bg, so you can always read it ontop of the bars)
    • misc changes to the colour a bar will be based on utilisation
    opened by alphastrata 0
  • [FEAT] Colour curves

    [FEAT] Colour curves

    Describe the solution you'd like The bars' colours are pretty boring and as they're set with (for now) hardcoded values and percentiles, not all hardware is reflected well. i.e on my Titan <70 degrees is kinda the norm, but on someone's laptop that'd be throttling territory so -- we should offer options to define how your fan curve maps to your hardware!

    Describe alternatives you've considered nil.

    Additional context btop is for example awesome : image

    it's SUPER clear that they run from smoothly from cooler colours to warm.

    enhancement 
    opened by alphastrata 0
  • [FEAT] Installations by other methods

    [FEAT] Installations by other methods

    Describe the solution you'd like It'd be nice for folk to be able to install with the usual suspects, i.e apt, yay, a bunch of compiled binaries in the #releases etc.

    Describe alternatives you've considered Doing it myself...

    Additional context This would be ideally done by someone who is into the whole 'CI/CD' building all the versions etc etc.

    enhancement 
    opened by alphastrata 0
Owner
Jer
Jer
Some hacks and failed experiments surrounding nvidia's gamestream protocol and sunshine/moonlight implementations

Sunrise This repository contains a bunch of experiments surrounding the nvidia gamestream protocol and reimplementations in the form of sunshine and m

Victoria Brekenfeld 5 Dec 21, 2022
Open Machine Intelligence Framework for Hackers. (GPU/CPU)

Leaf • Introduction Leaf is a open Machine Learning Framework for hackers to build classical, deep or hybrid machine learning applications. It was ins

Autumn 5.5k Jan 1, 2023
Open deep learning compiler stack for cpu, gpu and specialized accelerators

Open Deep Learning Compiler Stack Documentation | Contributors | Community | Release Notes Apache TVM is a compiler stack for deep learning systems. I

The Apache Software Foundation 8.9k Jan 4, 2023
Rust based Cross-GPU Machine Learning

HAL : Hyper Adaptive Learning Rust based Cross-GPU Machine Learning. Why Rust? This project is for those that miss strongly typed compiled languages.

Jason Ramapuram 83 Dec 20, 2022
A real-time implementation of "Ray Tracing in One Weekend" using nannou and rust-gpu.

Real-time Ray Tracing with nannou & rust-gpu An attempt at a real-time implementation of "Ray Tracing in One Weekend" by Peter Shirley. This was a per

null 89 Dec 23, 2022
Ecosystem of libraries and tools for writing and executing extremely fast GPU code fully in Rust.

Ecosystem of libraries and tools for writing and executing extremely fast GPU code fully in Rust.

Riccardo D'Ambrosio 2.1k Jan 5, 2023
Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.

The Rust CUDA Project An ecosystem of libraries and tools for writing and executing extremely fast GPU code fully in Rust Guide | Getting Started | Fe

Rust GPU 2.1k Dec 30, 2022
🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧

?? rust-gpu Rust as a first-class language and ecosystem for GPU graphics & compute shaders Current Status ?? Note: This project is still heavily in d

Embark 5.5k Jan 9, 2023
A Demo server serving Bert through ONNX with GPU written in Rust with <3

Demo BERT ONNX server written in rust This demo showcase the use of onnxruntime-rs on BERT with a GPU on CUDA 11 served by actix-web and tokenized wit

Xavier Tao 28 Jan 1, 2023
Damavand is a quantum circuit simulator. It can run on laptops or High Performance Computing architectures, such CPU distributed architectures or multi GPU distributed architectures.

Damavand is a code that simulates quantum circuits. In order to learn more about damavand, refer to the documentation. Development status Core feature

prevision.io 6 Mar 29, 2022