Skip to main content

NVSonar

PyPI version Python License Downloads

GPU monitoring tools show utilization percentages, but this can be misleading. A GPU reporting 100% utilization may actually be computing useful work, or wastefully stalled waiting on memory transfers, thermal throttling, or power limits. NVSonar analyzes real-time patterns from NVML metrics to identify what's actually limiting your GPU performance.

nvsonar demo

Features

  • Diagnostics: bottleneck classification (compute, memory, power, thermal, data-starved), temporal pattern detection (clock oscillation, temperature trends, utilization dips, memory leaks)
  • Multi-GPU: outlier detection via Z-scores, flags the GPU slowing down distributed training
  • Health scoring: 0-100 per GPU with A-F grades, actionable recommendations with specific commands
  • Benchmarks: memory bandwidth, compute throughput, PCIe speed vs theoretical specs
  • History: tracks GPU health over time, detects degradation trends
  • Python API: session monitoring during training (nvsonar.start(), nvsonar.stop())
  • Output: terminal report, JSON, CSV
  • Prometheus exporter: scrape bottleneck classification + health score from Grafana (nvsonar exporter)

Requirements

  • Python 3.10+
  • NVIDIA GPU with driver installed
  • Linux
  • CUDA toolkit (only for nvsonar benchmark, not required for other commands)

Installation and Usage

pip install nvsonar
nvsonar                       # interactive TUI
nvsonar report                # one-shot diagnostic
nvsonar report --plain        # plain text without colors
nvsonar report --json         # structured output for scripts/LLMs
nvsonar report --csv          # CSV output for spreadsheets
nvsonar report --gpu 0        # single GPU
nvsonar report --gpu 0,1,2    # subset of GPUs
nvsonar benchmark             # GPU performance benchmarks
nvsonar history               # health trends over time
nvsonar exporter              # Prometheus exporter on :9100/metrics

Prometheus + Grafana

nvsonar exporter exposes Prometheus metrics including bottleneck classification, throttle reason, and the NVSonar health score — the things DCGM's exporter doesn't surface. Add it to your prometheus.yml:

scrape_configs:
  - job_name: nvsonar
    static_configs:
      - targets: ['gpu-host:9100']

Useful PromQL:

sum by (type) (nvsonar_gpu_bottleneck)          # bottleneck distribution across the fleet
avg_over_time(nvsonar_gpu_health_score[1h])     # rolling health average
nvsonar_gpu_throttle_active{severity="critical"} # active critical throttle reasons

A ready-made Grafana dashboard is shipped at dashboards/nvsonar.json — import it in Grafana (+ → Import → Upload JSON file) and pick your Prometheus datasource. Ten panels: health score, bottleneck distribution, temperature with thermal thresholds, power draw vs limit, compute utilization, VRAM usage, active throttle reasons, ECC error rate, and exporter self-monitoring.

Documentation

Tested on

  • T4 (Turing)
  • A30 (Ampere)
  • GB10 Spark (Grace + Blackwell)

License

Apache License 2.0

Author

Bekmukhamed Tursunbayev

Metadata

Release files for nvsonar 2.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nvsonar 2.5.0
File Size Uploaded Provenance Actions
nvsonar-2.5.0.tar.gz 52.8 kB With provenance Details for nvsonar-2.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nvsonar 2.5.0
File Interpreter ABI Platform Actions
nvsonar-2.5.0-py3-none-any.whl Python 3 none any Details for nvsonar-2.5.0-py3-none-any.whl

Total release size: 107.2 kB

Release files / nvsonar-2.5.0.tar.gz

Download URL nvsonar-2.5.0.tar.gz
Size 52.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6eac74dc58c76f3b52b042ceea685f6388ee68427830b1bdaa54ea64b96170c8
BLAKE2b-256 checksum
How to use checksums
15ab31d10cb19efff34e0038e5a43787fe673e0f5be0c9ccd54f07440a91831a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / nvsonar-2.5.0-py3-none-any.whl

Download URL nvsonar-2.5.0-py3-none-any.whl
Size 54.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
341b833782a9e69df12a7e2506a0696063b04c585de13163cb7ba546e2b9d718
BLAKE2b-256 checksum
How to use checksums
02dde689caf6de62ad580dda950410f266ba11acf6626e58d53cea93371edb44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for nvsonar 2.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nvsonar-2.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page