Ir al contenido

Mission Center Web

Python 3.10+ psutil Chart.js 4 Vanilla JS No Electron CLS ~0.00

GitHub: stevenvo780/LectorDeUsoAvanzadoPC


Mission Center Web is a system resource monitor inspired by Windows Mission Center / Task Manager, rebuilt entirely as a pure web application. Backend: Python 3.10+ + psutil. Frontend: vanilla JS + Chart.js 4 — no Electron, no npm dependency on the monitored machine.

Open http://127.0.0.1:8080 in any browser and get live CPU cores, memory, GPU, disks, network, sensors, fans, and a process table — all updating in real time.

The original PySide6 desktop app was retired in favour of this web version. All collectors live in mission_center.data and are shared between the web version and any future clients.


PanelWhat you see
OverviewCPU %, memory, disk, network — each as a card + sliding history chart
PerformancePer-core mini-graphs (32 cores with stable layout); GPU summary (NVML)
AnalyticsMulti-series chart for all cores; independent read/write disk series
ProcessesTop-N table sorted by CPU, with memory and user columns; 2 s minimum sampling interval
SensorsGrouped temperatures (lm-sensors), fan RPM, battery and power supply state
SystemHardware, firmware, uptime, full PCIe link table

The app detects capabilities at startup and shows a real-time permission indicator in the UI:

StatusConditionNotes
Full accessRunning as root or with polkit grantAll metrics available — recommended
Good accessNormal user, 80%+ metrics availableTemperatures may be missing
Partial accessRestricted userBasic CPU/memory/network only
Limited accessNo sensors / hardware accessCore metrics still work

Use ./launch-privileged.sh to request elevated permissions automatically via PolicyKit or sudo.


mission_center/
core/ config, themes, update utilities
data/ psutil-based collectors (shared layer)
models/ dataclass snapshots (typed data contracts)
web/
collector.py background acquisition thread + sliding history store
server.py stdlib http.server — REST endpoints + static asset serving
templates/
index.html SPA shell
static/
css/styles.css Fluent dark theme (Windows 11 inspired)
js/app.js main orchestrator: Chart.js, panel navigation
js/api.js thin client for /api/current + /api/history
js/utils.js unit conversion and format helpers
EndpointReturns
GET /SPA shell (index.html)
GET /static/*CSS, JS, and asset files
GET /api/currentFull system snapshot as JSON
GET /api/historySliding-window history (configurable length)

The UI was engineered specifically to avoid layout shifts (CLS ≈ 0.00):

I/O device grid stability: A Set() maintains the device list across updates. Devices without current activity show zero values instead of disappearing from the grid, preventing layout reflow.

CPU core cards: Grid uses minmax(200px, 1fr) (up from 160px). Numeric values use font-variant-numeric: tabular-nums + min-width: 60px so changing numbers never resize their container.

Verified with 32-core + 8 I/O device configurations under continuous update cycles.


Ventana de terminal
git clone https://github.com/stevenvo780/LectorDeUsoAvanzadoPC.git
cd LectorDeUsoAvanzadoPC
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
./launch-privileged.sh # requests polkit/sudo for full hardware access
# Alternative: python main.py (or: python -m mission_center.web.server)
# Open http://127.0.0.1:8080

mission_center/core/config.py exposes security controls for shared-network deployments:

SECURITY = {
"allowed_origins": ["http://localhost:8080"], # CORS whitelist
"auth_enabled": False, # HTTP Basic Auth
"auth_user": "admin",
"auth_password": "changeme",
"rate_limit_window": 60, # seconds
"rate_limit_max": 120, # requests per IP per window
}

  • Python 3.10+
  • psutil (only required dependency)
  • Optional for extended metrics: pynvml (GPU), pyudev (USB), lm-sensors, smartmontools, NVML drivers

No Node.js, no build step, no Electron.


LayerTechnology
BackendPython 3.10+, psutil, stdlib http.server
FrontendVanilla JS, Chart.js 4
StylingCustom CSS, Fluent / Windows 11 dark theme
GPU metricspynvml (optional, NVIDIA only)
USB detectionpyudev (optional)
Sensor datalm-sensors, smartmontools (optional system packages)
Permission grantPolicyKit (polkit) or sudo via launch-privileged.sh