plugin

Plugin implementation for NVIDIA GPU monitoring using nvitop

NvidiaMonitorPlugin

NVIDIA GPU monitoring plugin using nvitop library. Provides real-time hardware telemetry for:

  • GPU Memory: Free, used, and total VRAM across all visible devices
  • GPU Utilization: Compute load percentage
  • System RAM: Via psutil for cross-platform support
  • CPU: Overall utilization percentage

Falls back to nvidia-smi if nvitop is not available.


source

NvidiaMonitorPlugin


def NvidiaMonitorPlugin(
    
):

NVIDIA System Monitor using nvitop.

Usage Example

# Direct usage (for testing)
plugin = NvidiaMonitorPlugin()
plugin.initialize()
stats = plugin.execute()
print(f"GPU Free: {stats['gpu_free_memory_mb']}MB")
print(f"RAM Available: {stats['memory_available_mb']}MB")

Integration with PluginManager

from cjm_plugin_system.core.manager import PluginManager
from cjm_plugin_system.core.scheduling import SafetyScheduler

manager = PluginManager(scheduler=SafetyScheduler())
manager.load_all()

# Register this plugin as the system monitor
manager.register_system_monitor("cjm-system-monitor-nvidia")

# Now scheduling checks will use real GPU stats
result = manager.execute_plugin("whisper-local", audio="/path/to/audio.wav")