All projects

Edge AI & hardware

rkdash

htop-style monitor for Rockchip SoCs.

CPU, memory, Mali GPU, NPU, RGA, thermals and throttling for RK3566, RK3576 and RK3588 in the terminal.

rkdash — a terminal dashboard for Rockchip boards

Why I built it

rktop is great, and I wanted the same dashboard as a single static Go binary I can copy onto any Rockchip board.

Architecture

How it fits together

Kernel

  • /proc and sysfs

  • RKNPU and Mali stats

  • hwmon

rkdash

  • Go and tcell

    one static binary

Panels

  • CPU, memory, GPU, NPU

  • Disk and network

  • Process table

Screenshots

See it in use

Documentation

From the README

Open on GitHub

A terminal-based system monitor for Rockchip single-board computers (RK3566, RK3576, RK3588 and variants), built with Go and tcell. It's an htop/btop-style dashboard that additionally surfaces Rockchip-specific hardware: GPU, NPU, and RGA utilization, per-cluster CPU frequency ranges, thermal zones, and driver/SDK version info.

This is a Go port of rktop by Alex Jokela, originally written in Rust with Ratatui. Panel layout, keybindings, and data sources mirror the original; this port reimplements them in Go with tcell instead of Ratatui/crossterm.

Features

  • CPU — per-core usage, aggregate user/system/iowait/idle breakdown, frequency ranges per cluster, governor, context switch/interrupt/softirq rates, running/blocked process counts, load average
  • Memory — total/used/available RAM, swap, and ZRAM compression stats; the RAM bar breaks out reclaimable page cache/buffers in a distinct color from true "used"
  • GPU / NPU / RGA — Mali GPU utilization and frequency, RKNPU per-core load and frequency, RGA per-scheduler load, with sparkline history for GPU/NPU
  • Disk & Network I/O — aggregate read/write throughput across physical disks, per-adapter RX/TX rates with IP addresses
  • Temperatures — all thermal zones plus GPU temperature via hwmon
  • Board info — board model, detected Rockchip SoC, CPU architecture/core mix, NPU/RGA driver versions, librknnrt/librkllmrt SDK versions
  • Process table — sortable by CPU, memory, PID, or name; live filter by name/user; SIGTERM a selected process with a confirmation prompt
  • Power / throttling — per-cluster cpufreq caps with an explicit warning when the kernel has capped a cluster below its hardware ceiling, active cooling-device states, fan RPM and rail power from hwmon
  • Accelerator ownership — a badge column showing which processes hold /dev/rknpu, /dev/mpp_service, /dev/rga, /dev/mali0 and friends open, plus a filter to show only those processes
  • Per-process detail — command line, exe, cwd, RSS/VSZ, fd count, cumulative disk I/O, accelerator handles, and per-process CPU/memory history
  • History graphs — gradient-coloured traces for CPU, memory, GPU, NPU, VPU, RGA, network and disk
  • Configurable — ~/.config/rkdash/rkdash.conf for refresh rates, hidden panels, sort order and colour mode; panels toggle live with the number keys
  • Scriptable — --json for a one-shot snapshot, --csv to record a benchmark run, --mcp for agent access
  • Live controls — pause/resume data refresh, mouse support, resize-aware layout

Requirements

  • A Rockchip-based Linux board (RK3566/RK3576/RK3588 families); some panels degrade gracefully (e.g. "Not Detected") on other hardware
  • Root privileges at runtime (reads root-only debugfs paths such as /sys/kernel/debug/mali0 and /sys/kernel/debug/rknpu)
  • Go 1.26+ to build

Installing

curl -fsSL https://raw.githubusercontent.com/anand34577/rkdash/main/install.sh | sh

The script downloads the latest linux/arm64 release, verifies its SHA-256, and installs it to /usr/local/bin/rkdash. Re-run the same command to update — it reports the version change and does nothing if you're already current.

# Uninstall (keeps your config; set RKDASH_PURGE=1 to delete that too)
curl -fsSL https://raw.githubusercontent.com/anand34577/rkdash/main/install.sh | sh -s -- --uninstall

# Pin a specific release
curl -fsSL https://raw.githubusercontent.com/anand34577/rkdash/main/install.sh | sh -s -- --version v1.1.0
VariableEffect
RKDASH_VERSIONInstall a specific tag instead of the latest
RKDASH_PREFIXInstall prefix (default /usr/local)
RKDASH_PURGEWith --uninstall, also delete the config file

The installer refuses to run on anything but Linux aarch64, and aborts rather than installing an unverified binary if the checksum doesn't match or no SHA-256 tool is available.

Manual install

If you'd rather not pipe a script to a shell, take the binary straight from the latest release:

curl -LO https://github.com/anand34577/rkdash/releases/latest/download/rkdash-linux-arm64
curl -LO https://github.com/anand34577/rkdash/releases/latest/download/rkdash-linux-arm64.sha256
sha256sum -c rkdash-linux-arm64.sha256
chmod +x rkdash-linux-arm64 && sudo ./rkdash-linux-arm64

Building

From the target board (or any Linux/arm64 host)

go build -o rkdash .

Cross-compiling from Windows

Two equivalent helper scripts are provided; both cross-compile for linux/arm64 and place the binary in dist/:

build-linux-arm64.bat
./build-linux-arm64.ps1

Copy the resulting binary to the board and run it:

chmod +x rkdash-linux-arm64
sudo ./rkdash-linux-arm64

Usage

sudo rkdash

MCP server mode

Running with --mcp skips the TUI entirely and serves rkdash's readers as an MCP server over stdio, so an MCP client (an agent, an IDE) can query board telemetry:

rkdash --mcp

Tools exposed: system_snapshot (CPU/memory/swap/ZRAM/load/uptime), hardware_info (board identity, GPU/NPU utilization and frequency, thermal zones), top_processes (sorted by CPU or memory). Root is not required to start this mode, but debugfs-gated readings (GPU/NPU) will report as unavailable without it, same as the TUI.

Scripting modes

# One-shot JSON snapshot (add --json-procs N to include the top N processes)
rkdash --json

# Record a benchmark run to CSV while the TUI is up
sudo rkdash --csv /tmp/rknn-bench.csv

--json emits system, hardware, VPU/RGA load, throttling, cooling and per-device disk counters in one document. --csv appends a row on every CPU refresh with CPU/mem/GPU/NPU, load, network and disk rates, a throttled flag, every thermal zone, and every VPU/RGA block — flushed each sample, so a Ctrl-C'd run still leaves a complete file.

KeyAction
↑ / ↓Move process selection (list scrolls to follow)
PgUp/PgDnMove selection by 10
EnterOpen/close the detail pane for the selected process
a / AShow only processes holding an NPU/VPU/RGA/GPU device
b / BToggle the accelerator badge column
1..9, 0Toggle a panel (cpu, memory, io, temps, power, sys, gpu, npu, rga, vpu)
SSave the current panels/sort to the config file
/Filter processes by name/user (Enter confirms, Esc clears)
c / CSort by CPU (toggles ascending/descending)
m / MSort by memory (toggles ascending/descending)
p / PSort by PID (toggles ascending/descending)
n / NSort by name (toggles ascending/descending)
x / XKill selected process (press y/Y to confirm SIGTERM)
SpacePause/resume data refresh
?Toggle help overlay
q / QQuit

Project layout

FileResponsibility
main.goEntry point, event loop, refresh scheduling, key handling
app.goAppState — UI/runtime state and derived stats updated each tick
sysmon.goCore system stats: CPU jiffies, memory, ZRAM, disk I/O, network, load
hardware.goRockchip/board-specific hardware: GPU/NPU/RGA, thermal, board identity
procs.goProcess/thread enumeration, CPU%/mem% computation, sorting
proccontrol.goProcess termination (SIGTERM)
filecache.goCached file descriptors for frequently-polled sysfs/debugfs paths
canvas.goSmall terminal-layout/rendering primitives (rects, spans, splitting)
ui.goPanel rendering: header, CPU/memory/accelerator/I/O panels, process table, help overlay
config.goConfig file load/save, panel visibility, colour-mode detection
accel.goAccelerator device ownership, cpufreq throttling, cooling, per-disk I/O
detail.goPer-process detail pane and its /proc/ readers
export.go--json snapshot and --csv recorder
install.shOne-command install / update / uninstall from GitHub releases
mcpserver.goMCP server mode (--mcp): exposes system/hardware readers as MCP tools over stdio

Configuration

Settings live in $XDG_CONFIG_HOME/rkdash/rkdash.conf (or $HOME/.config/rkdash/rkdash.conf). Override the path with --config or $RKDASH_CONFIG.

Note that rkdash runs under sudo, so $HOME is usually root's — set RKDASH_CONFIG if you want the file somewhere else. Press S in the TUI to write the current panel layout and sort order back to it.

refresh_cpu_ms  = 1000
refresh_io_ms   = 2000
refresh_proc_ms = 2000

# Panels toggled off, comma-separated
hidden = vpu,rga

sort = cpu          # cpu, mem, pid, name
truecolor = auto    # auto (trust $COLORTERM), on, off
accel_only = false  # start filtered to accelerator users
badges = true       # accelerator badge column (costs an fd walk per refresh)

If the UI renders as a single flat colour, your terminal isn't advertising 24-bit colour. Check echo $COLORTERM; set truecolor = off to get a readable 8-colour palette instead of a muddy gradient.

The terminal itself is polled every 250ms for input and resize responsiveness independent of these data refresh intervals.

The terminal itself is polled every 250ms for input and resize responsiveness independent of these data refresh intervals.

Developer tooling

tools/stripcomments is a small Go-AST-based utility used to strip all comments from the top-level *.go files in this repository without altering behavior — it parses each file with go/parser, drops all comment nodes, and re-emits the source with go/format, which guarantees the result still parses and compiles.

# Preview which files would change
go run ./tools/stripcomments -dir .

# Apply the changes
go run ./tools/stripcomments -dir . -write

It only touches *.go files directly inside the given -dir (non-recursive) and skips _test.go files.

Edge AI & hardware

More like this