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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nvsonar-2.4.0.tar.gz (51.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvsonar-2.4.0-py3-none-any.whl (54.4 kB view details)

Uploaded Python 3

File details

Details for the file nvsonar-2.4.0.tar.gz.

File metadata

  • Download URL: nvsonar-2.4.0.tar.gz
  • Upload date:
  • Size: 51.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nvsonar-2.4.0.tar.gz
Algorithm Hash digest
SHA256 77eefac1b5c965fbdc962e90eec65573add66ee20f1a183f728059e6b785ba9b
MD5 05e14bc9546f6f0ef0048be65e54d697
BLAKE2b-256 deea0878b9caf67d5546c0a790f5591ba01c3a05fe59b811071febe872473ee2

See more details on using hashes here.

Provenance

The following attestation bundles were made for nvsonar-2.4.0.tar.gz:

Publisher: publish.yml on btursunbayev/nvsonar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nvsonar-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: nvsonar-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 54.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nvsonar-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bc5b2ea49862198b185812ae4eac7530e30b0a2af4f65d562eaf580ed97457e
MD5 b46284fcf0f8153d3bd362dd5242fb01
BLAKE2b-256 5800c15e970483013bd864d3da521f561d82f73582b42cc544cae871b380aad0

See more details on using hashes here.

Provenance

The following attestation bundles were made for nvsonar-2.4.0-py3-none-any.whl:

Publisher: publish.yml on btursunbayev/nvsonar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 files

2.3.0

2 files

2.2.0

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.1.0

2 files

1.0.2

2 files

1.0.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page