nviwatch

msminhas93GPL-3.0活跃维护

用 Rust 写的 NVIDIA GPU 终端监控面板,能实时查看显存占用和进程,比反复敲 nvidia-smi 更直观高效。

NviWatch: A blazingly fast rust based TUI for managing and monitoring NVIDIA GPU processes

v0.2.4发布于 2026-08-06 04:13 UTC242star15fork同步于 2026-11-07 07:31 UTC

怎么上手

由 README 提炼,执行前请确认
cargo install nviwatch
./nviwatch
硬件要求按 README 说明

需要 NVIDIA GPU,通过 NVML 读取指标;README 未说明具体显存要求,也未提及 CPU 运行或非 NVIDIA 显卡支持

多卡 / 张量并行
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 Rust 写的 NVIDIA GPU 监控 TUI,实时查看显存、利用率和进程,还能直接结束进程

用 Rust 写的 NVIDIA GPU 终端监控面板,能实时查看显存占用和进程,比反复敲 nvidia-smi 更直观高效。

核心能力

  • 实时显示 GPU 温度、利用率、显存和功耗
  • 在界面内直接终止选中的 GPU 进程
  • 提供默认、柱状图和分标签三种视图模式
  • 支持自定义刷新间隔,默认 300ms
  • 可将指标流式写入 InfluxDB 做长期监控

容易踩的坑

InfluxDB 集成需先运行 scripts/setup_influxdb.sh 并手动获取 admin token;--cpu 系统监控需显式开启,且默认 300ms 刷新会让进程列表跳动,建议配 --watch 1500;预编译二进制仅提供 Linux 版本

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.4
  1. v0.2.4v0.2.4 — CPU + system process monitoring最新正式版2026-08-06 · 2026-08-06 04:13 UTC

    If you've been bouncing between htop and gpustat/nviwatch, 0.2.4 optionally puts host CPU/RAM next to the GPU view in one TUI.

    Try it

    cargo install nviwatch
    nviwatch --cpu --watch 1500
    

    Default stays GPU-only (no flag). With --cpu you get CPU info + per-core meters, a top-50 process list (s toggles sort by CPU% vs GPU memory), and optional Influx system_metrics. A longer --watch keeps the process list from jumping every few hundred ms.

    Also: first metrics paint immediately (no blank wait for --watch), README documents the real 300 ms default, and install docs cover conda-forge (conda / mamba / pixi).

    Install

    • crates.io: cargo install nviwatch
    • conda-forge: conda install -c conda-forge nviwatch
    • Binary: Linux x86_64 asset attached below

    Thanks

  2. v0.2.32026-08-04 · 2026-08-04 21:46 UTC
    查看更新说明

    What's new

    Dependency updates for a fresher stack — no intentional CLI/UX changes from 0.2.2.

    Dependency bumps

    • clap 4.6.5
    • nix 0.31.3
    • nvml-wrapper 0.12.1
    • procfs 0.18.0
    • ratatui 0.30.2
    • influxdb 0.8.0
    • tokio 1.53.1

    Assets

    Linux x86_64 release binary attached below. Or install with:

    cargo install nviwatch
    
  3. v0.2.22026-08-04 · 2026-08-04 21:39 UTC
    查看更新说明

    What's new

    Consolidates @MrDwarf7’s improvements (#11–#19 via #20) and TUI polish.

    Highlights

    • Stable Rust edition 2024, nvml crate alias (no nightly/Cranelift)
    • NviError, module cleanup, panic hook / safer tokio runtime init
    • Influx skipped when flags incomplete; invalid full config surfaces in UI
    • Vim/emacs navigation (hjkl, gg/G, Ctrl+p/n/b/f); kill with x or dd
    • Min-size gate, scrollable ? help, clearer process table (GPU-Mem, htop-style CPU%)

    Breaking / key changes

    • Default graph mode is Ctrl+d (was plain d)
    • Plain d arms vim-style kill chord (dd); x still kills immediately

    Credit

    Large portions of this release are from MrDwarf7 (Blake B.) — thank you.

  4. v0.2.1Release v0.2.12025-08-21 · 2025-08-21 17:10 UTC

    这个版本没有写更新说明。

  5. v0.2.0Release v0.2.02025-06-26 · 2025-06-26 06:02 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    NviWatch

    NviWatch is an interactive terminal user interface (TUI) application for monitoring NVIDIA GPU devices and processes. Built with Rust, it provides real-time insights into GPU performance metrics, including temperature, utilization, memory usage, and power consumption.

    Demo

    https://github.com/user-attachments/assets/176565fe-4467-4129-b783-071543c52bf4

    Benchmarks

    We conducted performance benchmarks comparing nviwatch with other popular GPU monitoring tools: nvtop, nvitop, and gpustat. The results demonstrate nviwatch's efficiency in terms of CPU and memory usage. All tools except nvitop were run at 100ms interval. nvitop was set to 250ms because that is the minimum allowed value. The benchmark scripts and logs are available in the benchmarks folder. The test system had 32 GB RAM.

    nvitop error for 100ms input

    Benchmark Results

    ToolCPU Usage (%)Memory Usage (%)Memory Usage (MB)
    Mean / MaxMean / MaxMean / Max
    nviwatch0.28 / 10.00.12 / 0.1218.26 / 18.26
    nvtop0.25 / 20.00.13 / 0.1320.46 / 20.46
    nvitop0.88 / 10.00.26 / 0.2641.07 / 41.07
    gpustat3.47 / 49.90.21 / 0.2133.82 / 33.82

    Benchmarks comparison

    Installation Size Comparison

    We used python-package-size for determining the pip package sizes. For nvtop We used this apt show nvtop | grep Installed-Size.

    ToolPackage Size
    nviwatch1.98 MB
    nvitop4.1 MB
    gpustat3.7 MB
    nvtop106 KB

    Analysis

    • CPU Usage: nviwatch demonstrates excellent CPU efficiency, with an average usage of just 0.28% and a maximum of 10%. It outperforms gpustat and nvitop and is comparable to nvtop in terms of average CPU usage. Important to note that nvtop supports more GPUs than just Nvidia so nviwatch isn't a complete alternative for nvwatch.

    • Memory Usage: nviwatch shows the lowest memory footprint among all tested tools, using only 0.12% of system memory on average, which translates to about 18.26 MB. This is notably less than nvitop (41.07 MB) and gpustat (33.82 MB), and slightly better than nvtop (20.46 MB).

    • Consistency: nviwatch maintains consistent memory usage throughout its operation, as indicated by the identical mean and max values for memory usage.

    • Package Size: At 1.98 MB, nviwatch offers a balanced package size. It's significantly smaller than nvitop (4.1 MB) and gpustat (3.7 MB), while being significantly larger than nvtop (106 KB).

    Features

    • Real-Time Monitoring: View real-time data on GPU temperature, utilization, memory usage, and power consumption.
    • Process Management: Monitor processes running on the GPU and terminate them directly from the interface.
    • Graphical Display: Visualize GPU performance metrics using bar charts and tabbed graphs.
    • Customizable Refresh Rate: Set the refresh interval for updating GPU metrics.
    • InfluxDB Integration: Stream GPU metrics to InfluxDB for long-term monitoring and visualization.

    InfluxDB Integration

    NviWatch supports streaming GPU metrics to InfluxDB for persistent storage and advanced visualization. This enables long-term monitoring, historical analysis, and custom dashboards.

    Setting up InfluxDB

    1. Run the setup script (recommended for Ubuntu/Debian):

      chmod +x scripts/setup_influxdb.sh
      ./scripts/setup_influxdb.sh
      

      This script will:

      • Install InfluxDB 3.x (with fallback to InfluxDB 2.x if 3.x is not available)
      • Configure the database with default settings:
        • Username: admin
        • Password: password12345
        • Organization: my-org
        • Bucket: gpu-metrics
        • Data retention: 7 days
      • Import a pre-configured GPU monitoring dashboard
    2. Get your admin token:

      influx auth list
      
    3. Access the InfluxDB dashboard:

      • Open your web browser and navigate to http://localhost:8086
      • Login with the credentials:
        • Username: admin
        • Password: password12345

    Running NviWatch with InfluxDB Logging

    To start NviWatch with InfluxDB integration, use the following command-line options:

    nviwatch \
      --influx-url "http://localhost:8086" \
      --influx-org "my-org" \
      --influx-bucket "gpu-metrics" \
      --influx-token "your-admin-token-here"
    

    Example with all options:

    nviwatch \
      --watch 1000 \
      --tabbed-graphs \
      --influx-url "http://localhost:8086" \
      --influx-org "my-org" \
      --influx-bucket "gpu-metrics" \
      --influx-token "your-admin-token-here"
    

    Dashboard Features

    The included dashboard provides:

    • Memory Utilization: Real-time GPU memory usage tracking
    • GPU Utilization: Performance utilization percentage over time
    • Temperature: GPU temperature monitoring
    • Power Usage: Power consumption tracking in watts

    InfluxDB Dashboard

    Custom Configuration

    You can modify the scripts/setup_influxdb.sh script to change default settings:

    • Edit the configuration variables at the top of the script
    • Re-run the script to apply changes
    • Update your nviwatch command with the new credentials

    Installing and Using the Tool

    Option 1: Download Pre-built Binary

    1. Go to the project's GitHub repository.

    2. Navigate to the "Releases" section.

    3. Download the latest binary release for linux.

    4. Once downloaded, open a terminal and navigate to the directory containing the downloaded binary.

    5. Make the binary executable with the following command:

      chmod +x nviwatch
      
    6. You can now run the tool using:

      ./nviwatch
      

    Option 2: Install via Cargo

    If you have Rust and Cargo installed on your system, you can easily install NviWatch directly from crates.io:

    1. Open a terminal and run the following command:

      cargo install nviwatch
      
    2. Once the installation is complete, you can run NviWatch from anywhere in your terminal:

      nviwatch
      

    Note: Ensure you have the NVIDIA Management Library (NVML) available on your system before running NviWatch.

    Option 3: Install via Conda, Mamba, or Pixi

    NviWatch is also available from conda-forge:

    1. With Conda (after activating an environment):

      conda install -c conda-forge nviwatch
      
    2. With Mamba (after activating an environment):

      mamba install -c conda-forge nviwatch
      
    3. With Pixi (user-global install):

      pixi global install --channel conda-forge nviwatch
      
    4. Once the installation is complete, you can run NviWatch from anywhere in your terminal:

      nviwatch
      

    Option 4: Build from Source

    To build and run NviWatch, ensure you have Rust and Cargo installed on your system. You will also need the NVIDIA Management Library (NVML) available.

    1. Clone the repository:

      git clone https://github.com/msminhas93/nviwatch.git
      cd nviwatch
      
    2. Build the project:

      cargo build --release
      
    3. Run the application:

      chmod +x ./target/release/nviwatch
      ./target/release/nviwatch
      

    Usage

    NviWatch provides a command-line interface with several options:

    • -w, --watch <MILLISECONDS>: Set the refresh interval in milliseconds. Default is 300 ms.
    • -t, --tabbed-graphs: Display GPU graphs in a tabbed view.
    • -b, --bar-chart: Display GPU graphs as bar charts.
    • -c, --cpu: Enable CPU and system-wide process monitoring (CPU/RAM panels, top-50 system process tray sortable with s, and optional InfluxDB system_metrics). Without this flag, nviwatch monitors GPUs only. Pair with a longer refresh (e.g. --watch 1500) for a less jittery process list — short windows (default 300 ms) re-rank by instantaneous CPU% every tick, which looks jumpy compared to htop’s ~1.5 s default.
    • --influx-url <URL>: InfluxDB server URL (e.g., "http://localhost:8086").
    • --influx-org <ORG>: InfluxDB organization name.
    • --influx-bucket <BUCKET>: InfluxDB bucket name for storing metrics.
    • --influx-token <TOKEN>: InfluxDB authentication token.

    Basic examples:

    # Run with default settings
    ./nviwatch
    
    # Run with CPU + GPU monitoring (calmer list refresh, closer to htop)
    ./nviwatch --cpu --watch 1500
    
    # Run with custom refresh rate and tabbed graphs
    ./nviwatch --watch 500 --tabbed-graphs
    
    # Run with InfluxDB integration
    ./nviwatch \
      --influx-url "http://localhost:8086" \
      --influx-org "my-org" \
      --influx-bucket "gpu-metrics" \
      --influx-token "your-admin-token-here"
    
    # Run with all features enabled
    ./nviwatch \
      --watch 1000 \
      --cpu \
      --tabbed-graphs \
      --influx-url "http://localhost:8086" \
      --influx-org "my-org" \
      --influx-bucket "gpu-metrics" \
      --influx-token "your-admin-token-here"
    

    Key Bindings

    • q: Quit the application
    • ↑/↓: Navigate through the list of processes
    • ←/→: Switch between GPU tabs (when using tabbed graphs)
    • x: Terminate the selected process
    • s: Toggle process sort (CPU% ↔ GPU memory) — only with --cpu
    • d: Switch to default view mode
    • t: Switch to tabbed graphs view mode
    • b: Switch to bar charts view mode
    • ?: Toggle help overlay

    View Modes

    The application supports three different view modes:

    1. Default Mode

    Shows all GPU information in a single view

    2. Bar Mode

    Presents GPU information using bar charts

    3. Tabbed Mode: GPU graphs in tabs for multi GPU nodes

    Displays GPU graphs in a tabbed interface

    You can switch between these modes at any time using the corresponding key bindings.

    License

    This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

    Contributing

    Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

    Acknowledgments