# kula **Repository Path**: stonebox/kula ## Basic Information - **Project Name**: kula - **Description**: No description available - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-13 - **Last Updated**: 2026-03-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
image # K U L A **Lightweight, self-contained Linuxยฎ server monitoring tool.** ![Go](https://img.shields.io/badge/made%20for-linux-yellow?logo=linux&logoColor=ffffff) ![Go](https://img.shields.io/badge/go%20go-power%20rangers-blue?logo=go&logoColor=ffffff) ![JS](https://img.shields.io/badge/some%20-js-orange?logo=javascript&logoColor=ffffff) ![JS](https://img.shields.io/badge/and%20a%20pinch%20of-bash-green?logo=linux&logoColor=ffffff) [![License: GPL v3](https://img.shields.io/badge/License-AGPLv3-red.svg)](https://www.gnu.org/licenses/agpl-3.0) [๐Ÿ‘€ Demo](https://demo.kula.ovh/) | [๐Ÿ‹ Docker Hub](https://hub.docker.com/r/c0m4r/kula) Zero dependencies. No external databases. Single binary. Just deploy and go. image
--- ## ๐Ÿ“ฆ What It Does Kula collects system metrics every second by reading directly from `/proc` and `/sys`, stores them in a built-in tiered ring-buffer storage engine, and serves them through a real-time Web UI dashboard and a terminal TUI. | Metric | What's Collected | |--------|-----------------| | **CPU** | Total usage (user, system, iowait, irq, softirq, steal) + core count | | **Load** | 1 / 5 / 15 min averages, running & total tasks | | **Memory** | Total, free, available, used, buffers, cached, shmem | | **Swap** | Total, free, used | | **Network** | Per-interface throughput (Mbps), packets/s, errors, drops; TCP errors/s, resets/s, established connections; socket counts | | **Disks** | Per-device I/O (read/write bytes/s, reads/s, writes/s IOPS); filesystem usage | | **System** | Uptime, entropy, clock sync, hostname, logged-in user count | | **Processes** | Running, sleeping, blocked, zombie counts | | **Self** | Kula's own CPU%, RSS memory, open file descriptors | | **Thermal** | CPU and Disk temperatures | --- ## ๐Ÿชฉ How It Works ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Linux Kernel โ”‚ โ”‚ /proc/stat /proc/meminfo /sys/... โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ read every 1s โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Collectors โ”‚ โ”‚ (cpu, mem, net, โ”‚ โ”‚ disk, system) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ Sample struct โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ–ผ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Storage โ”‚ โ”‚ Web โ”‚ โ”‚ TUI โ”‚ โ”‚ Engine โ”‚ โ”‚ Server โ”‚ โ”‚ Terminal โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” HTTP + WebSocket โ–ผ โ–ผ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Tier 1 โ”‚ Tier 2 โ”‚ Tier 3 โ”‚ โ”‚ Dashboard โ”‚ โ”‚ 1s โ”‚ 1m โ”‚ 5m โ”‚ โ”‚ (Browser) โ”‚ โ”‚ 250 MB โ”‚ 150 MB โ”‚ 50 MB โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ Ring-buffer binary files with circular overwrites ``` ### Storage Engine Data is persisted in **pre-allocated ring-buffer files** per tier. Each tier file has a fixed maximum size โ€” when it fills up, new data overwrites the oldest entries. This gives predictable, bounded disk usage with no cleanup needed. - **Tier 1** โ€” Raw 1-second samples (default 250 MB) - **Tier 2** โ€” 1-minute metrics aggregation (Avg/Min/Max) (default 150 MB) - **Tier 3** โ€” 5-minute metrics aggregation (Avg/Min/Max) (default 50 MB) ### HTTP server The HTTP server on backend exposes a REST API and a WebSocket endpoint for live streaming. Authentication is optional - when enabled, it uses Argon2id hashing with salt and session cookies. It is worth adding that Kula truly respects your privacy. It works on closed networks and does not make any calls to external services. ### Dashboard The frontend is a single-page application embedded in the binary. Built on Chart.js with custom SVG gauges, it connects via WebSocket for live updates and falls back to history API for longer time ranges. Features include: - Interactive zoom with drag-select (auto-pauses live stream) - Focus mode to display only specific charts of interest - Configurable Y-axis bounds (Manual limits or Auto-detect) - Per-device selectors for Network, Disk I/O, and Thermal monitoring - Grid / stacked list layout toggle - Alert system for clock sync, low entropy, and system overload - Modern aesthetics with light/dark theme support --- ## ๐Ÿ’พ Installation Kula was built to have everything in one binary file. You can just upload it to your server and not worry about installingย anything else because Kula has no dependencies. It just works out of the box! It is a great tool when you need to quickly start real-time monitoring. Example installation methods for **amd64 (x86_64)** GNU/Linux. Check [Releases](https://github.com/c0m4r/kula/releases) for **ARM** and **RISC-V** packages. ### Guided installation ```bash KULA_INSTALL=$(mktemp) curl -o ${KULA_INSTALL} -fsSL https://kula.ovh/install echo "f0c064b20d23c948a4569a35cfe65589a36a497aa0d9037413c6e452471355dd ${KULA_INSTALL}" | sha256sum -c || rm -f ${KULA_INSTALL} bash ${KULA_INSTALL} rm -f ${KULA_INSTALL} ``` ### Quick ```bash wget https://github.com/c0m4r/kula/releases/download/0.8.3/kula-0.8.3-amd64.tar.gz echo "f0e9c99b309d89414eec8e5a65792afbef7f1ee7c8353bfab4c72a4682979777 kula-0.8.3-amd64.tar.gz" | sha256sum -c || rm -f kula-0.8.3-amd64.tar.gz tar -xvf kula-0.8.3-amd64.tar.gz cd kula ./kula ``` ### Docker Temporary, no persistent storage: ```bash docker run --rm -it --name kula --pid host --network host -v /proc:/proc:ro c0m4r/kula:latest ``` With persistent storage: ```bash docker run -d --name kula --pid host --network host -v /proc:/proc:ro -v kula_data:/app/data c0m4r/kula:latest docker logs -f kula ``` ### Debian / Ubuntu (.deb) ```bash wget https://github.com/c0m4r/kula/releases/download/0.8.3/kula-0.8.3-amd64.deb echo "53ea1623dc85a57919baf1ade5fdc512022cd2630149a93a827616a02437ed60 kula-0.8.3-amd64.deb" | sha256sum -c || rm -f kula-0.8.3-amd64.deb sudo dpkg -i kula-0.8.3-amd64.deb systemctl status kula ``` ### RHEL / Fedora / CentOS / Rocky / Alma (.rpm) ```bash wget https://github.com/c0m4r/kula/releases/download/0.8.3/kula-0.8.3-x86_64.rpm echo "9c3a4d3c53e11544a51b7161e9887b15fff7dcd334c6bb648e98f7ab8db80109 kula-0.8.3-x86_64.rpm" | sha256sum -c || rm -f kula-0.8.3-x86_64.rpm sudo rpm -i kula-0.8.3-x86_64.rpm systemctl status kula ``` ### Arch Linux / Manjaro (AUR) ```bash wget https://github.com/c0m4r/kula/releases/download/0.8.3/kula-0.8.3-aur.tar.gz echo "85cb8c7aa7b637be82cdfcf1a9a06f91c7458bb37e00d7a00f605f0ee2590bca kula-0.8.3-aur.tar.gz" | sha256sum -c || rm -f kula-0.8.3-aur.tar.gz tar -xvf kula-0.8.3-aur.tar.gz cd kula-0.8.3-aur makepkg -si ``` ### Build from Source ```bash git clone https://github.com/c0m4r/kula.git cd kula bash addons/build.sh ``` --- ## ๐Ÿ’ป Usage ### Quick Start ```bash # 1. Copy and edit config (optional) cp config.example.yaml config.yaml # 2. Start the server ./kula serve # Dashboard at http://127.0.0.1:8080 # 3. Or use the terminal UI ./kula tui # 4. Inspect storage ./kula inspect ``` ### Authentication (Optional) ```bash # Generate password hash ./kula hash-password # Add the output to config.yaml under web.auth ``` ### Service Management Init system files are provided in `addons/init/`: ```bash # systemd sudo cp addons/init/systemd/kula.service /etc/systemd/system/ sudo systemctl enable --now kula # OpenRC sudo cp addons/init/openrc/kula /etc/init.d/ sudo rc-update add kula default # runit sudo cp -r addons/init/runit/kula /etc/sv/ sudo ln -s /etc/sv/kula /var/service/ ``` --- ## โš™๏ธ Configuration All settings live in `config.yaml`. See [`config.example.yaml`](config.example.yaml) for defaults. --- ## ๐Ÿงฐ Development ```bash # Lint + test suite bash ./addons/check.sh # Build dev (Binary size: ~14MB) CGO_ENABLED=0 go build -o kula ./cmd/kula/ # Build prod (Binary size: ~9MB, xz: ~3MB) CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -buildvcs=false -o kula ./cmd/kula/ ``` ### Updating Dependencies To safely update only the Go modules used by Kula to their latest minor/patch versions, and prune any unused dependencies: ```bash go get -u ./... go mod tidy ``` ### Testing & Benchmarks ```bash # Run unit tests with race detector go test -race ./... # Run the full storage benchmark suite (default: 3s per bench) bash addons/benchmark.sh # Shorter run for quick iteration bash addons/benchmark.sh 500ms # Python scripts formatter and linters black addons/*.py pylint addons/*.py mypy --strict addons/*.py ``` ### Cross-Compile ```bash bash addons/build.sh cross # builds amd64, arm64, riscv64 ``` ### Debian / Ubuntu (.deb) ```bash bash addons/build_deb.sh ls -1 dist/kula-*.deb ``` ### Arch Linux / Manjaro (AUR) ```bash bash addons/build_aur.sh cd dist/aur && makepkg -si ``` ### RHEL / Fedora / CentOS / Rocky / Alma (.rpm) ```bash bash addons/build_rpm.sh ls -1 dist/kula-*.rpm ``` ### Docker ```bash bash addons/docker/build.sh docker compose -f addons/docker/docker-compose.yml up -d ``` --- ## ๐Ÿ“– License [GNU Affero General Public License v3.0](LICENSE) --- ## ๐Ÿซถ Attributions - [Linuxยฎ](https://github.com/torvalds/linux) is the registered trademark of Linus Torvalds in the U.S. and other countries. - [Chart.js](https://www.chartjs.org/) library licensed under MIT - [Inter](https://github.com/rsms/inter) font by Rasmus Andersson licensed under [OFL-1.1](https://openfontlicense.org/) - [Press Start 2P](https://fonts.google.com/specimen/Press+Start+2P?query=CodeMan38) font by CodeMan38 licensed under [OFL-1.1](https://openfontlicense.org/)