Monitor PC
demo-kit/ è quello che simula il dispositivo per la demo nella pagina di inizio. Il dispositivo stesso non ne ha bisogno.
demo-kit/ è quello che simula il dispositivo per la demo nella pagina di inizio. Il dispositivo stesso non ne ha bisogno.
Makes a Windows PC a Connectivitizer device named home-pc that brings its own screen: a terminal-style dashboard ("SYS//MON") with live CPU, memory, GPU, disk and network readings. The Connectivitizer app shows it full screen, peer to peer when the networks allow it and through the relay otherwise. The connection is end-to-end encrypted either way, and the PC opens no port.
| Folder | |
|---|---|
agent/ | The program for the PC (C#, .NET 10): a web server on 127.0.0.1 with the readings and the page, and the Connectivitizer agent that exposes it as service api. |
ui/pc-stats.html | The device UI: one self-contained page, built into the program. |
ui/manifest.json | What the program serves as /.cz/ui.json. |
ui/demo-data.js | A pretend PC with invented values, for the demo on the landing page (demo kit). |
Windows only: the readings come from Windows APIs and performance counters.
cd agent
dotnet publish -c Release -o publishThis gives one self-contained file, publish\cz-stats.exe.
Copy secrets.template.json to secrets.json next to the exe (or into agent/ before publishing; it is git-ignored) and fill it in:
deviceKey: web app, Credentials > Create credential > Device key (czd_...).sharedKey: web app, Credentials > Generate a shared key (czs_...). The same key goes on the phone in the app under Keys > Add a key (scan the QR code from the web app).The environment variables CZ_DEVICE_KEY and CZ_SHARED_KEY override the file.
Double-click cz-stats.exe. It serves the page on 127.0.0.1 only. The agent exposes it as service api and keeps one outbound connection.
Without keys the program still serves the page locally and prints its address, so you can look at it in a browser on the PC.
Device state (login, shared key, service) is kept in %LOCALAPPDATA%\CzStats\state.
One page with tabs (#/cpu, #/gpu, ...). Tap the tabs or swipe between them. Each tab asks its own endpoint, and each probe only samples while its tab is open.
| Tab | Endpoint | Shows |
|---|---|---|
| OVR | /stats | CPU, RAM and VRAM gauges, 2-minute chart, log |
| CPU | /cpu | model, clock, cache, per-thread load and heatmap, top processes |
| MEM | /memory | RAM, cache, commit, kernel pools, top processes |
| GPU | /gpu | load per engine, VRAM, NVIDIA sensors (temperature, power, clocks, fan), top processes |
| DISK | /disks | volumes, read/write and activity per disk |
| NET | /network | traffic per adapter, TCP connections |
| SYS | /system | OS, board, BIOS, uptime, Connectivitizer agent and sessions |
home-pc online under Devices.home-pc to see the dashboard.If the app says "The device does not accept this app", allow the client Connectivitizer under Clients allowed to connect on the device's page.
The program and its page have run on a Windows 11 PC with the Connectivitizer app on Android. The demo on the landing page shows the same page with the invented values of ui/demo-data.js.