Skip to content

JairFC/system-control-panel

Repository files navigation

System Control Panel

License: MIT Python 3.10+ Platform: Windows GPU: NVIDIA

Turn your NVIDIA GPU into a self-hosted AI workstation with real-time monitoring, a semantic knowledge base, and full service management — all from a single dashboard.


What is this?

A local-first control panel for Windows machines with NVIDIA GPUs. It combines:

  • 🖥️ System Monitoring — CPU, RAM, GPU temp, VRAM, fan speed, power draw
  • 🧠 Brain KB — Semantic knowledge base with GPU-accelerated embeddings (bge-m3)
  • 🔧 Service Management — Start/stop Ollama, Qdrant, and AI services from the UI
  • 🏥 Health Diagnostics — Detect memory leaks, handle leaks, and zombie processes
  • 🎮 Mode Switching — One-click gaming/work mode (frees VRAM, manages power plans)
  • 🌐 Network Monitor — Multi-hop latency tracking with traceroute, jitter, and MOS scoring

Everything runs locally on your machine. No cloud. No subscriptions.


Architecture

┌──────────────────────────────────────────────────────────────────────┐
│                         YOUR WINDOWS HOST                            │
│                                                                      │
│   ┌──────────────────────────────┐   ┌──────────────────────────┐   │
│   │  Dashboard API (port 9001)   │   │  NVIDIA GPU              │   │
│   │  FastAPI + static frontend   │   │  VRAM-accelerated AI     │   │
│   │  ── Routers ──────────────── │   │  bge-m3 embeddings       │   │
│   │  /api/system    /api/gpu     │   │  Ollama models           │   │
│   │  /api/services  /api/health  │   └──────────────────────────┘   │
│   │  /api/brain     /api/network │                                   │
│   │  /api/bluetooth /api/mode    │   ┌──────────────────────────┐   │
│   └──────────────────────────────┘   │  Qdrant (port 6333)      │   │
│                                       │  Vector database         │   │
│   ┌──────────────────────────────┐   └──────────────────────────┘   │
│   │  Ollama (port 11434)         │                                   │
│   │  Local LLM server            │   ┌──────────────────────────┐   │
│   │  Embeddings + reranking      │   │  Brain CLI               │   │
│   └──────────────────────────────┘   │  Ingest / query / list   │   │
│                                       └──────────────────────────┘   │
└──────────────────────────────────────────────────────────────────────┘
              ▲                                    ▲
              │ LAN (auto-detected IP)             │ localhost
              │                                    │
    ┌─────────┴───────────┐              ┌─────────┴───────────┐
    │  Browser / curl      │              │  brain_cli.py        │
    │  Any LAN device      │              │  Antigravity / IDE   │
    └─────────────────────┘              └─────────────────────┘

Default Ports

Service Port Description
Dashboard 9001 Web UI + REST API
Qdrant 6333 Vector database
Ollama 11434 LLM server (optional)

All ports are configurable via environment variables. See Configuration.


Quick Start

Prerequisites

  • Windows 10/11 with an NVIDIA GPU
  • Python 3.10+ with pip
  • NVIDIA drivers (for nvidia-smi)
  • Qdrant binary (download)
  • Ollama (optional, for LLM features) (download)

Installation

# Clone the repo
git clone https://github.com/JairFC/system-control-panel.git
cd system-control-panel

Then double-click INSTALL.cmd — that's it.

Alternatively, from PowerShell: .\setup.ps1

The installer automatically:

  • ✅ Checks prerequisites (Python 3.10+, NVIDIA GPU)
  • ✅ Creates virtual environment & installs PyTorch with CUDA
  • ✅ Downloads Qdrant vector database
  • ✅ Creates .env configuration
  • ✅ Creates a Desktop shortcut with a custom icon
  • ✅ Sets up auto-start with Windows (tray icon)

After installation

Double-click "System Control Panel" on your Desktop.

The tray icon appears in your taskbar — it auto-starts the dashboard and opens the browser.

Dashboard URL: http://localhost:9001

Management Commands

.\manage.ps1 start           # Start dashboard + Qdrant (background)
.\manage.ps1 start -Dev      # Start in dev mode (foreground, auto-reload)
.\manage.ps1 stop            # Stop everything
.\manage.ps1 restart         # Restart
.\manage.ps1 status          # Check what's running
.\manage.ps1 tray            # Re-launch the tray icon
.\manage.ps1 open            # Open dashboard in browser

Configuration

All settings are loaded from environment variables. Create a .env file in the project root (see .env.example):

Variable Default Description
SCP_LAN_IP (auto-detected) LAN IP for the dashboard
SCP_TRUSTED_CLIENTS (empty) Comma-separated allowed client IPs
SCP_DASHBOARD_PORT 9001 Dashboard API port
SCP_OLLAMA_PORT 11434 Ollama server port
SCP_QDRANT_PORT 6333 Qdrant vector DB port
SCP_QDRANT_EXE qdrant\qdrant.exe Path to Qdrant binary

The LAN IP is auto-detected on startup. Override only if detection fails.


API Reference

Base URL: http://localhost:9001

All endpoints return JSON.

System Stats — GET /api/system

Returns CPU, RAM, and top processes.

{
  "cpu": { "load": 16, "cores": 8, "threads": 16 },
  "ram": { "total_gb": 31.7, "used_gb": 23.2, "free_gb": 8.4, "percent": 73 },
  "processes": { "total": 362, "top": [...] }
}

GPU Stats — GET /api/gpu

Returns GPU hardware stats from nvidia-smi.

{
  "name": "NVIDIA GeForce RTX 3080",
  "vram_used_mb": 6166, "vram_total_mb": 10240, "vram_percent": 60,
  "temperature": 41, "utilization": 23,
  "power_draw": 78.5, "fan_speed": 41,
  "compute_apps": [...]
}

Service Control — GET /api/services

Returns status of managed services (Ollama, Qdrant, Brain embedder).

# Start a service
curl -X POST http://localhost:9001/api/services/ollama/start

# Stop a service
curl -X POST http://localhost:9001/api/services/qdrant/stop

# Restart
curl -X POST http://localhost:9001/api/services/ollama/restart

Brain KB — /api/brain

Semantic knowledge base with GPU-accelerated embeddings.

# Ingest a document
curl -X POST http://localhost:9001/api/brain/ingest \
  -H "Content-Type: application/json" \
  -d '{"text": "Important note", "space": "personal", "title": "My Note"}'

# Query the brain
curl -X POST http://localhost:9001/api/brain/query \
  -H "Content-Type: application/json" \
  -d '{"question": "What did I note?", "contexts": ["personal"], "top_k": 5}'

System Health — GET /api/health

Detects memory leaks, handle leaks, and zombie processes. Returns fixable issues with one-click remediation.

Mode Switching — POST /api/mode/{mode}

Mode Effect
clean Kill leaky processes, flush temp files
gaming Stop AI services, free VRAM, High Performance power plan
work Start AI services, Balanced power plan

Network — GET /api/network

Multi-hop latency monitor with traceroute discovery, jitter calculation, packet loss tracking, SLA compliance scoring, and MOS (Mean Opinion Score).

Bluetooth — GET /api/bluetooth

MediaTek Bluetooth service control.


Brain CLI

A command-line tool for interacting with the Brain KB:

# Check status
python brain_cli.py status

# Ingest a fact
python brain_cli.py ingest --text "Python 3.12 is the latest stable" --space coding --title "Python version"

# Query
python brain_cli.py query "What Python version is latest?" --top_k 5

# List all memories
python brain_cli.py list
python brain_cli.py list --space personal

# Batch ingest from JSON
python brain_cli.py ingest-batch facts.json

Project Structure

system-control-panel/
├── setup.ps1                  # One-click installer (run this first!)
├── manage.ps1                 # Management script (start/stop/status)
├── tray.py                    # System tray icon (optional)
├── brain_cli.py               # Brain KB CLI
├── requirements.txt           # Python dependencies
├── .env.example               # Configuration template
├── LICENSE                    # MIT License
│
├── dashboard/
│   ├── api/
│   │   ├── main.py            # FastAPI app entry point
│   │   ├── config.py          # Configuration (env vars + auto-detect)
│   │   ├── middleware.py       # IP whitelist + cache control
│   │   ├── routers/
│   │   │   ├── system.py      # CPU, RAM, processes
│   │   │   ├── gpu.py         # GPU stats (nvidia-smi)
│   │   │   ├── health.py      # System health diagnostics
│   │   │   ├── bluetooth.py   # Bluetooth service control
│   │   │   ├── services/      # Service management (hexagonal)
│   │   │   │   ├── router.py      # HTTP routes
│   │   │   │   ├── ollama.py      # Ollama control + models
│   │   │   │   ├── qdrant.py      # Qdrant control
│   │   │   │   └── embed.py       # Brain embedder + power
│   │   │   ├── network/       # Network monitor (hexagonal)
│   │   │   │   ├── router.py      # HTTP routes
│   │   │   │   ├── monitor.py     # Ping monitor engine
│   │   │   │   ├── tracert.py     # Route discovery
│   │   │   │   ├── scoring.py     # SLA / Quality / MOS
│   │   │   │   ├── alert_log.py   # JSONL alert logger
│   │   │   │   └── constants.py   # Thresholds + regex
│   │   │   └── brain/         # Knowledge base (RAG)
│   │   │       ├── router.py      # API endpoints
│   │   │       ├── embedder.py    # GPU-accelerated bge-m3
│   │   │       ├── search.py      # Hybrid search
│   │   │       ├── chunking.py    # Doc chunking
│   │   │       └── memory.py      # Conversation memory
│   │   └── utils/
│   │       └── process_utils.py   # Subprocess + HTTP helpers
│   └── frontend/
│       ├── index.html         # Dashboard SPA
│       ├── css/style.css      # Design system
│       └── js/                # Modular JS components
│
├── scp_tray.vbs               # Silent tray launcher
└── install_tray.ps1           # Startup shortcut installer

Polling Recommendations (for integrations)

Endpoint Interval Latency Notes
/api/system 5-10s ~50ms Lightweight (psutil)
/api/gpu 5-10s ~200ms nvidia-smi subprocess
/api/services 10-30s ~500ms Port checks + health probes
/api/health 30-60s ~400ms PowerShell diagnostics
/api/network 1s ~10ms SSE or polling (when active)

Dependencies

  • Python 3.10+ with CUDA-enabled PyTorch
  • FastAPI + Uvicorn — ASGI web framework
  • sentence-transformers — GPU-accelerated embeddings (bge-m3)
  • psutil — Cross-platform system monitoring
  • nvidia-smi — GPU stats (included with NVIDIA drivers)
  • Qdrant — Vector database for Brain KB
  • Ollama — Local LLM server (optional, for generation/reranking)

License

MIT — use it however you want.

About

System Control Panel GPU dashboard, cross-platform network monitor, service management

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors