Skip to main content

An NVIDIA GPU monitoring plugin for the cjm-plugin-system that provides real-time hardware telemetry via nvitop.

Project description

cjm-system-monitor-nvidia

Install

pip install cjm_system_monitor_nvidia

Project Structure

nbs/
├── meta.ipynb   # Metadata introspection for the NVIDIA monitor plugin used by cjm-ctl to generate the registration manifest
└── plugin.ipynb # Plugin implementation for NVIDIA GPU monitoring using nvitop

Total: 2 notebooks

Module Dependencies

graph LR
    meta[meta<br/>meta]
    plugin[plugin<br/>plugin]

No cross-module dependencies detected.

CLI Reference

No CLI commands found in this project.

Module Overview

Detailed documentation for each module in the project:

meta (meta.ipynb)

Metadata introspection for the NVIDIA monitor plugin used by cjm-ctl to generate the registration manifest

Import

from cjm_system_monitor_nvidia.meta import (
    get_plugin_metadata
)

Functions

def get_plugin_metadata() -> Dict[str, Any]:  # Plugin metadata for manifest generation
    """Return metadata required to register this plugin with the PluginManager."""
    return {
        "name": "cjm-system-monitor-nvidia",
    "Return metadata required to register this plugin with the PluginManager."

plugin (plugin.ipynb)

Plugin implementation for NVIDIA GPU monitoring using nvitop

Import

from cjm_system_monitor_nvidia.plugin import (
    NvidiaMonitorPlugin
)

Classes

class NvidiaMonitorPlugin:
    def __init__(self):
        """Initialize the NVIDIA monitor plugin."""
        self.logger = logging.getLogger(f"{__name__}.{type(self).__name__}")
        self.config = {}

    @property
    def name(self) -> str:  # Plugin identifier
    "NVIDIA System Monitor using nvitop."
    
    def __init__(self):
            """Initialize the NVIDIA monitor plugin."""
            self.logger = logging.getLogger(f"{__name__}.{type(self).__name__}")
            self.config = {}
    
        @property
        def name(self) -> str:  # Plugin identifier
        "Initialize the NVIDIA monitor plugin."
    
    def name(self) -> str:  # Plugin identifier
            """Plugin name."""
            return "sys-mon-nvidia"
        
        @property
        def version(self) -> str:  # Plugin version
        "Plugin name."
    
    def version(self) -> str:  # Plugin version
            """Plugin version."""
            return "1.0.0"
    
        def initialize(
            self,
            config: Optional[Dict[str, Any]] = None  # Configuration dictionary
        ) -> None
        "Plugin version."
    
    def initialize(
            self,
            config: Optional[Dict[str, Any]] = None  # Configuration dictionary
        ) -> None
        "Initialize or reconfigure the plugin."
    
    def get_config_schema(self) -> Dict[str, Any]:  # JSON Schema
            """Return JSON Schema for configuration."""
            return {}  # No config needed for monitoring
    
        def get_current_config(self) -> Dict[str, Any]:  # Current config
        "Return JSON Schema for configuration."
    
    def get_current_config(self) -> Dict[str, Any]:  # Current config
            """Return current configuration."""
            return self.config
    
        def cleanup(self) -> None
        "Return current configuration."
    
    def cleanup(self) -> None:
            """Clean up resources."""
            pass
    
        def _get_gpu_info_internal(self) -> Dict[str, Any]:  # Raw GPU data
        "Clean up resources."
    
    def execute(
            self,
            command: str = "get_system_status",  # Command to execute
            **kwargs
        ) -> Dict[str, Any]:  # SystemStats as dictionary
        "Collect stats and return standardized SystemStats dictionary."

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

cjm_system_monitor_nvidia-0.0.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

cjm_system_monitor_nvidia-0.0.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file cjm_system_monitor_nvidia-0.0.2.tar.gz.

File metadata

File hashes

Hashes for cjm_system_monitor_nvidia-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b0f62bfae9b312bc065a554bdc116153d1666681e82ff62eff5a8e0aff8c77df
MD5 4c2cecf1359210e8b7258ed6786bf531
BLAKE2b-256 6c2c15b53153e2c5dd604486c092611138805872d865ba6fe0a2d91f79019ada

See more details on using hashes here.

File details

Details for the file cjm_system_monitor_nvidia-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cjm_system_monitor_nvidia-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5886e765e59cbe964349be732ff5807b4037e4c487e0a430b713c12d9f49c30d
MD5 137d721b163b1e269f7237177a1c7ab4
BLAKE2b-256 6ff76048e8aa51c66d180f104a8add9d87d5aef7b6919d56f18bbfd18d9bba40

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