bussdcc-system
bussdcc-system is a reference application demonstrating how to build a real system using bussdcc — a deterministic cybernetic runtime for Python.
It monitors host system health and exposes:
- live metrics via a web dashboard
- structured event streams
- historical JSONL logging
- real-time UI updates through WebSockets
The project is intentionally small but complete. It shows how services, processes, interfaces, and sinks work together inside a bussdcc runtime.
Overview
This application collects and visualizes system telemetry:
- CPU usage
- Memory usage
- Disk usage
- System load averages
- CPU temperature
- Network throughput
- Hardware throttling / undervoltage status (Raspberry Pi compatible)
- Host identity information
The runtime emits events continuously, which are:
- processed into state
- streamed to a web interface
- logged to disk
This demonstrates bussdcc’s core pattern:
Service → Events → Process → State → Interface → UI
↓
Sinks
Architecture
The project intentionally mirrors bussdcc’s runtime model.
Services
SystemService
Runs periodically and emits system telemetry events:
system.memory.usage.updated
system.cpu.usage.updated
system.disk.usage.updated
system.temperature.updated
system.network.usage.updated
system.throttling.updated
Services are responsible only for observing the world and emitting events.
Processes
SystemProcess
Consumes events and updates runtime state:
ctx.state.set("system.cpu.usage", evt.data)
Processes transform event streams into structured shared state.
Interface
SystemWebInterface
- Runs a Flask + Socket.IO server
- Streams runtime events to the browser
- Renders state snapshots on page load
Interfaces expose the system externally without coupling to services.
Event Sinks
Two sinks demonstrate observability patterns:
ConsoleSink
Prints structured JSON events to stdout.
JsonlSink
Writes rotating JSONL event logs:
data/history/YYYY-MM-DD/HH-MM-SS.jsonl
Each line is a single immutable event record.
Dashboard
The web UI provides live system visibility:
- ✅ Health status indicator
- CPU usage breakdown
- Memory & disk utilization
- Load averages
- Network throughput per interface
- Thermal & power throttling detection
Updates occur in real time using Socket.IO events emitted directly from the runtime.
Installation
Requires Python 3.11+.
Standard Install (Recommended)
Install from PyPI:
pip install bussdcc-system-health
Or install locally for development:
pip install -e .
Linux / Raspberry Pi Setup
On Debian-based systems (including Raspberry Pi OS), install required system packages:
sudo apt-get update
sudo apt-get install -y \
python3-pip \
python3-flask \
python3-psutil \
python3-flask-socketio \
python3-flask-bootstrap
Then install the application:
pip install bussdcc-system-health --break-system-packages
--break-system-packagesmay be required on newer Debian and Raspberry Pi OS releases due to externally-managed Python environments (PEP 668).
Optional: Virtual Environment (Alternative)
If you prefer not to use --break-system-packages:
python3 -m venv .venv
source .venv/bin/activate
pip install bussdcc-system-health
Running
Start the runtime:
bussdcc-system-health
Then open:
http://localhost:8086
Example Event Output
Console sink output:
{"time":"2026-01-01T12:00:00Z","name":"system.cpu.usage.updated","data":{"user":12.4,"system":3.1,"idle":84.5}}
This illustrates bussdcc’s core idea:
the system is an event stream first, UI second.
Project Structure
bussdcc_system_health/
├── cli.py # runtime entrypoint
├── runtime/ # custom runtime lifecycle
├── services/ # telemetry collection
├── processes/ # state projection
├── interfaces/ # web UI
└── sinks/ # event logging
What This Example Demonstrates
This project is designed as a learning reference for bussdcc concepts:
| Concept | Demonstrated By |
|---|---|
| Deterministic runtime | custom Runtime |
| Periodic services | SystemService |
| Event-driven state | SystemProcess |
| External interfaces | Flask web UI |
| Observability | sinks |
| Real-time updates | Socket.IO bridge |
Why bussdcc?
Traditional applications couple:
logic ↔ UI ↔ IO ↔ background work
bussdcc separates responsibilities through events:
observe → emit → transform → expose
This leads to systems that are:
- easier to reason about
- deterministic
- observable by default
- naturally extensible
Hardware Notes
Some features depend on Linux system interfaces:
| Feature | Platform |
|---|---|
| CPU temperature | Linux SBC / Raspberry Pi |
| Throttling detection | Raspberry Pi firmware |
| Network metrics | Linux |
The application still runs on non-Pi systems, but certain fields may be unavailable.
Development
Install dependencies:
pip install -e .[dev]
Run directly:
python -m bussdcc_system_health.cli
License
MIT License
Related
- bussdcc runtime: https://github.com/jbussdieker/bussdcc
Metadata
Release files for bussdcc-system 0.45.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bussdcc_system-0.45.0.tar.gz | 33.8 kB | Without provenance | Details for bussdcc_system-0.45.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bussdcc_system-0.45.0-py3-none-any.whl | Python 3 | none | any | Details for bussdcc_system-0.45.0-py3-none-any.whl |
Total release size: 74.1 kB
Release files / bussdcc_system-0.45.0.tar.gz
| Download URL | bussdcc_system-0.45.0.tar.gz |
|---|---|
| Size | 33.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c07b1acd57ac617d9f7ecbb91a81b771bd7d1f759a2541bc4c19d234f8fa47b
|
|
BLAKE2b-256 checksum How to use checksums |
113eeec760a92d7863cecec3c304016a56f791a4ba3fe2a7f54fc621a27a0e29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / bussdcc_system-0.45.0-py3-none-any.whl
| Download URL | bussdcc_system-0.45.0-py3-none-any.whl |
|---|---|
| Size | 40.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fb927959f99eb101d1904194cfe10855a7324d6823f41ce939c026f5884032e
|
|
BLAKE2b-256 checksum How to use checksums |
4c665b0f52257c6ba7cff4ea2d8fd8176bd0b828d7707f4699f2170d52dbe337
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for bussdcc-system 0.45.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.