FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

dzhusipov/gpu-graph-cli: ๐Ÿ–ฅ๏ธ Terminal-based NVIDIA GPU monitoring tool written in Rust ยท GitHub

Latest commit

ย 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GPU Graph CLI

A terminal-based utility written in Rust for monitoring NVIDIA GPU utilization via nvidia-smi with real-time graph visualization.

Features

  • Monitor multiple GPUs simultaneously
  • Real-time display of GPU utilization, memory usage, temperature, and power consumption
  • Cyberpunk/hacker-style visual theme with neon colors
  • Data stored in memory only (no disk persistence)
  • Data updates every second
  • Stores last 60 minutes of metrics history

Requirements

  • Rust (version 1.75 or higher)
  • NVIDIA drivers with nvidia-smi
  • Linux (for nvidia-smi support)

Dependencies

Crate Version Description
ratatui 0.29.0 Terminal UI framework
crossterm 0.29.0 Cross-platform terminal manipulation
tokio 1.48.0 Async runtime
chrono 0.4.42 Date and time library

Project Structure

src/
โ”œโ”€โ”€ main.rs      # Entry point, terminal setup/cleanup, main loop
โ”œโ”€โ”€ app.rs       # App struct - application state management
โ”œโ”€โ”€ models.rs    # GpuDataPoint, GpuInfo - data models
โ”œโ”€โ”€ nvidia.rs    # fetch_gpu_data - nvidia-smi integration
โ”œโ”€โ”€ theme.rs     # Color constants (NEON_GREEN, DARK_BG, etc.)
โ””โ”€โ”€ ui.rs        # UI rendering functions

Architecture

  • models.rs โ€” Data structures (Data Layer)
  • nvidia.rs โ€” External system integration (Infrastructure Layer)
  • theme.rs โ€” Style configuration (Presentation Constants)
  • ui.rs โ€” Interface rendering (Presentation Layer)
  • app.rs โ€” Application business logic (Application Layer)
  • main.rs โ€” Initialization and main loop (Entry Point)

Building

cargo build --release

Running

cargo run --release

Or after building:

./target/release/gpu-graph-cli

Controls

  • q or Esc - exit the program

Docker

Building the Image

docker build -t gpu-graph-cli .

Running the Container

docker run --gpus all -it --rm gpu-graph-cli

Or use the convenience script:

./docker-run.sh

Important: nvidia-container-runtime is required for GPU access in Docker. Make sure it's installed on your system.

Displayed Metrics

For each GPU, the following metrics are shown:

  • GPU Utilization - percentage of GPU usage (progress bar + sparkline graph)
  • Memory Usage - memory utilization (progress bar)
  • Temperature - GPU temperature in ยฐC (sparkline graph)
  • Power Usage - power consumption in Watts

Screenshot

The interface features a cyberpunk aesthetic with:

  • Neon green, cyan, magenta, and yellow color scheme
  • Real-time sparkline graphs
  • Status indicators that change color based on load levels

License

MIT

About

๐Ÿ–ฅ๏ธ Terminal-based NVIDIA GPU monitoring tool written in Rust

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL