Skip to main content

A lightweight napari dock widget for monitoring hardware and UI responsiveness during local AI and image analysis workflows.

Project description

napari-hardware-monitor

Hardware and responsiveness monitoring inside napari.

napari-hardware-monitor adds a compact dock for watching napari UI responsiveness, CPU, system memory, GPU activity, and GPU memory while image-analysis and local AI workflows run.

napari-hardware-monitor widget

Features

  • napari Health card with Qt event-loop delay and recent-freeze readout
  • CPU, system RAM, NVIDIA GPU, and VRAM monitoring
  • GPU temperature and power draw when reported by nvidia-smi
  • compact gauge cards with short history traces
  • optional per-core CPU panel
  • Start / Pause, refresh interval, Float / Attach, and Copy Snapshot controls

Why This Plugin Exists

Large images and local AI workflows can make napari slow or briefly unresponsive.

The operating system may show a "napari is not responding" dialog with Wait and Force Quit, but that appears only after the UI is already stuck. It does not keep a history or help after napari responds again.

This plugin adds the missing context inside napari:

  • current hardware pressure from CPU, system RAM, GPU, and VRAM
  • UI responsiveness from Qt event-loop delay
  • a recent-freeze readout, such as 4500 ms, 18s ago, after recovery

It does not identify the exact code that caused a freeze. After napari responds again, it shows how long the UI was delayed and what the surrounding hardware state looked like, so users have useful context for adjusting the workload or reporting the issue.

Scope

napari-hardware-monitor is a hardware and responsiveness visibility plugin. It is not a profiler, model launcher, training manager, benchmark suite, or process attribution tool.

The values are system-level. They tell users what the machine is doing, not which exact plugin or process caused the load.

GPU Support

NVIDIA GPU monitoring uses nvidia-smi. If it is unavailable, the plugin still shows CPU and system memory with a clear no-GPU fallback.

Multi-GPU systems are summarized as aggregate VRAM, maximum GPU utilization, maximum temperature, and total power draw. If a driver reports GPU activity but not VRAM totals, the GPU memory card shows N/A.

Usage

Open napari and choose:

Plugins > Hardware Monitor

Controls:

  • Start: begin automatic polling.
  • Pause: stop polling while keeping the last values visible.
  • 1s / 2s / 5s: choose refresh interval.
  • Float / Attach: detach or reattach the monitor dock when the napari dock container supports it.
  • Copy: copy a plain-text hardware and napari health snapshot.
  • CPU cores: expand or collapse optional per-core CPU usage.

Installation

pip install napari-hardware-monitor

Development

git clone https://github.com/wulinteousa2-hash/napari-hardware-monitor.git
cd napari-hardware-monitor
pip install -e ".[test]"
pytest -q
napari

Design Notes

  • Polling runs off the Qt UI thread so a slow nvidia-smi call does not freeze the dock.
  • napari Health is measured on the Qt UI thread using event-loop delay.
  • Recent freeze information stays visible briefly after recovery.
  • The dashboard uses Qt painting directly and avoids heavy plotting dependencies.
  • The dashboard keeps only a short in-memory history.
  • Per-core CPU detail is collapsed by default.

Release Notes

1.1.0

Usability and responsiveness diagnostics release.

  • Added sticky recent-freeze readout with duration and age.
  • Added recent-freeze details to copied snapshots.
  • Increased default dock width and height for clearer metric cards.
  • Improved metric card sizing so GPU information is not clipped.
  • Made CPU cores collapse restore the compact dock height.
  • Changed Float into a Float / Attach toggle when napari exposes dock floating APIs.

1.0.0

Stable responsiveness release.

  • Added napari Health card.
  • Added Qt event-loop delay monitoring.
  • Added readable health states: Healthy, Busy, Lagging, and Frozen recently.
  • Added health hints for common bottlenecks.
  • Added napari health details to copied snapshots.

0.1.0

Initial release.

  • Added compact napari dock widget.
  • Added CPU, RAM, GPU, and VRAM dashboard cards.
  • Added gauge and sparkline visualizations.
  • Added optional per-core CPU panel.
  • Added asynchronous hardware polling.
  • Added NVIDIA GPU support through nvidia-smi.
  • Added multi-GPU summary behavior.
  • Added dock float action, refresh control, pause/start, and copy snapshot.

Project details


Download files

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

Source Distribution

napari_hardware_monitor-1.1.0.tar.gz (81.8 kB view details)

Uploaded Source

Built Distribution

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

napari_hardware_monitor-1.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file napari_hardware_monitor-1.1.0.tar.gz.

File metadata

  • Download URL: napari_hardware_monitor-1.1.0.tar.gz
  • Upload date:
  • Size: 81.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for napari_hardware_monitor-1.1.0.tar.gz
Algorithm Hash digest
SHA256 11e7b83dc45f715bc7f89817165f04398bf6ee8b1d22c30b4612c6a56c3f0d40
MD5 1c60d137b9e92fda4b201c021cc31cc0
BLAKE2b-256 ebe98676dfe1f4a4ae70de011948a9116a82aacc52d080d2f0ebfb1e05388418

See more details on using hashes here.

File details

Details for the file napari_hardware_monitor-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_hardware_monitor-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fea3fe64fdb7d38fbe370c10056c0ff2f55235060c8c26cfa0934daef080041
MD5 9c37d75eed5bf94ad2e7c610b61619f5
BLAKE2b-256 6e23652a958795a2cc5cb1d91a370f5e8b23d133200707ccd3411b4ee2b87bd4

See more details on using hashes here.

Supported by

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