Skip to content

Repository files navigation

dashtop

THIS IS EXPERIMENTAL AND NETWORK INTERFACES NEED CAREFUL ATTENTION

A tiny dashboard that lets a tablet (or any browser) watch a PC's live state over the local network. The PC runs a small Python server; the tablet just opens a web page — nothing to install on the tablet.

Shows: CPU (total, per-core, frequency), memory & swap, disk usage per volume, disk I/O, network throughput, top processes, uptime, battery and temperatures where available. NVIDIA GPUs too (utilization, VRAM, temperature, power, fan, clocks) whenever nvidia-smi is on PATH — no extra install needed. History charts cover the last 5 or 15 minutes and update every 2 seconds over Server-Sent Events.

Works on Windows 10/11 and Linux (macOS too). Only dependency: psutil. The page is fully self-contained — no internet access or CDN needed.

Quick start — Windows 10

  1. Install Python 3 from https://www.python.org/downloads/ — tick "Add python.exe to PATH" during setup.
  2. Copy this folder to the PC and double-click start.bat.
  3. The first run, Windows Firewall will ask — click Allow access (Private networks is enough).
  4. The console prints the address, e.g. http://192.168.1.23:8010. Open that on the tablet.

If the tablet is USB-connected and you want the dashboard to stay local-only, run the PC server with --adb and use:

adb reverse tcp:8010 tcp:8010

Then open http://127.0.0.1:8010 on the tablet.

Quick start — Linux

./start.sh
# or manually:
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
python server.py

Open the printed http://<pc-ip>:8010 on the tablet. If the tablet can't reach it, allow the port through the firewall, e.g. sudo ufw allow 8010/tcp (Ubuntu) or sudo firewall-cmd --add-port=8010/tcp --permanent && sudo firewall-cmd --reload (Fedora).

Options

python server.py --port 8010 --interval 2 --history 15
Flag Default Meaning
--port 8010 HTTP port
--host 0.0.0.0 bind address (use 127.0.0.1 to keep it local-only)
--adb false bind to localhost and use adb reverse to let a connected tablet reach the page
--interval 2 seconds between samples
--history 15 minutes of chart history kept in memory

Endpoints

Path What
/ the dashboard page
/api/summary JSON: static info + latest snapshot + history
/api/stream Server-Sent Events, one snapshot per sample

Start automatically

Windows 10 — Task Scheduler → Create Basic Task → trigger When I log on → action Start a program → program C:\path\to\dashtop\start.bat. In the task's properties, set Start in to the dashtop folder.

Linux (systemd) — save as /etc/systemd/system/dashtop.service:

[Unit]
Description=dashtop system dashboard
After=network.target

[Service]
ExecStart=/opt/dashtop/.venv/bin/python /opt/dashtop/server.py
Restart=on-failure
User=youruser

[Install]
WantedBy=multi-user.target

Then sudo systemctl enable --now dashtop.

Tests

pip install -r requirements-dev.txt
python -m pytest tests/ -v
File What it covers
tests/test_security.py Path traversal, method handling, header hygiene, XSS guard
tests/test_performance.py Sampling cost, response latency, payload size, concurrency, history bounds
tests/test_no_data_leak.py Binding isolation (2-interface / "2v2"), no outbound connections, no disk persistence, API field audit, CORS, error hygiene, memory bounds, static sandbox
tests/test_gpu.py nvidia-smi parsing (no hardware needed), graceful no-GPU fallback, live GPU sanity — set DASHTOP_EXPECT_GPU to assert a specific model
tests/test_data_usage.py Honest bandwidth/memory/CPU metrics — prints real numbers at runtime
tests/test_e2e_adb.py Full end-to-end with a USB-connected Android tablet (skips if no device)

Build (standalone .exe)

pip install pyinstaller
python build.py --zip

Produces dist/dashtop/ — a self-contained folder with dashtop.exe (no Python required), the static frontend, and platform-tools/ (adb) for USB‑tethered Android tablets. build.py --zip also creates a zip for distribution.

CI/CD

On every push to main, GitHub Actions runs the test suite. Pushing a version tag (v0.1.0, v1.0.0, etc.) builds the distributable zip and attaches it to a GitHub Release automatically.

git tag v0.1.0
git push origin v0.1.0

Security notes

dashtop is read-only — it never executes commands or accepts input that changes the PC — but it has no authentication: anyone on your network can view the stats (hostname, process names, IP). Run it on a trusted home/LAN network only. Don't port-forward it to the internet as-is; if you need remote access, put it behind a reverse proxy with auth (or a VPN like WireGuard/ Tailscale).

ideally before using this program you should ensure some knowledge of your network topology (use nmap).





image

About

web dash board for performance

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages