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."""
# Fallback base path (current behavior for backward compatibility)
base_path = os.path.dirname(os.path.dirname(sys.executable))
# Use CJM config if available, else fallback to env-relative paths
cjm_data_dir = os.environ.get("CJM_DATA_DIR")
# Plugin data directory
plugin_name = "cjm-system-monitor-nvidia"
if cjm_data_dir
"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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cjm_system_monitor_nvidia-0.0.3.tar.gz.
File metadata
- Download URL: cjm_system_monitor_nvidia-0.0.3.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae590037bb911fb8e312a9cb791ce620711c06b81911ed62c5686ce5e82dca74
|
|
| MD5 |
0c59bbdaf7432acf945d32b5de4eeaff
|
|
| BLAKE2b-256 |
a864f439bff8f7a408cc3727a145387af1205d695ac648c18eed896290feaf1c
|
File details
Details for the file cjm_system_monitor_nvidia-0.0.3-py3-none-any.whl.
File metadata
- Download URL: cjm_system_monitor_nvidia-0.0.3-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4e7233ae11e80f09264796b71c841dfdeb51648978ed59becd8733e0838e1b
|
|
| MD5 |
d467ba57ed746673a5898bc4dc1a35b4
|
|
| BLAKE2b-256 |
6ca2d29f4b6806c5593fcb42da084cdf0d44af78e99f12fd1fb49cad333d81a6
|