Simple, dependency-light server dashboard that shows live CPU and RAM usage (plus basic host info) in the browser. Backend is plain PHP, frontend is a single HTML page driven by Chart.js.
- Live CPU and RAM chart, refreshed every 2 seconds.
- Non-blocking metric collection: no slow
top,mpstatoriostatsampling. Linux uses/proc; Windows uses WMI (wmic, with PowerShell CIM fallback). - Cross-platform: accurate data on Linux and Windows; graceful fallback to load average when detailed sources are unavailable.
- Optional shared-secret token to gate the JSON API.
- No build step and no server-side framework required.
- PHP 7.4+ served by any web server (Apache, Nginx + PHP-FPM, or
php -S). - Linux for the most precise metrics (reads
/proc). On Windows the page and chart work fully via WMI; on other platforms the page loads but live charts may be empty.
app/
index.php Dashboard page (HTML/CSS/JS)
loader.php JSON API (?action=system_info | general)
config.example.php Configuration template
back.webp, logo.png Static assets
robots.txt
Serve the app/ directory with PHP:
php -S 0.0.0.0:8080 -t appThen open http://localhost:8080/.
On Windows you can double-click start.bat — it starts the server and
opens the browser in one step.
Copy the template and edit it (the real file is gitignored):
cp app/config.example.php app/config.phpSet access_token to a non-empty value to require a token on the API. When
set, requests must include it via ?token=... or the X-Auth-Token header;
the dashboard injects it automatically.
The token is a basic safeguard only. Because
index.phpexposes the token to the browser, protect the page itself at the web-server level (HTTP basic auth or an IP allowlist) if the data must stay private.
| Endpoint | Description |
|---|---|
loader.php?action=system_info |
{ load, memory_usage } (live) |
loader.php?action=general |
{ cpu_count, php_ver, os_data } |
- On Linux the first poll after server start returns a load-average
approximation; subsequent polls (every 2s) show the true
/proc/statdelta. - On Windows
wmicis preferred; if it is unavailable (Windows 11 24H2 has it as an optional feature) the PowerShell CIM fallback is transparently used. - The built-in PHP server is single-threaded. For production with multiple concurrent viewers, serve behind Nginx or Apache.
- The shared-secret token is a basic safeguard only — because
index.phpexposes it client-side, protect the wholeapp/directory at the web-server level for real privacy.
# Start the built-in server
php -S 127.0.0.1:8080 -t app
# Windows: one-click launcher
start.bat
# Lint all PHP files
find app -name '*.php' -print0 | xargs -0 -n1 php -l 2>&1 | grep -v '^No syntax'All PHP files are linted on every push and pull request via GitHub Actions
(see .github/workflows/ci.yml).
Released under the MIT License.
