Add GPU fan control, live telemetry, and per-profile fan curves in HyperSwap dashboard

This commit is contained in:
drjones
2026-08-23 08:56:06 -07:00
parent 850e1aa565
commit 1f198ae10e
9 changed files with 1237 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ from typing import Dict, List, Any, Optional
from mcp.server import MCPServer
import ram_optimizer
import vram_arbitrator
import overclock_manager
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s")
logger = logging.getLogger("gpu_swapper_mcp")
@@ -117,6 +118,21 @@ async def run_model_switch_benchmark(iterations: int = 2) -> str:
"rounds": results,
}, indent=2)
@mcp.tool()
def get_gpu_fan_status() -> str:
"""Get current GPU fan control mode (auto vs manual) and target speed."""
status = overclock_manager.get_fan_status()
return json.dumps(status, indent=2)
@mcp.tool()
def set_gpu_fan_speed(mode: str = "auto", percent: Optional[int] = None) -> str:
"""Set GPU fan speed mode ('auto' or 'manual') with target percent (30-100%)."""
if mode.lower() == "manual" and percent is not None:
res = overclock_manager.set_fan_speed(percent)
else:
res = overclock_manager.set_fan_auto()
return json.dumps(res, indent=2)
# ==========================================
# MCP RESOURCES
# ==========================================