rockchip-stats
System monitor and control tool for Rockchip SoC devices
rockchip-stats is a monitoring and control package for Rockchip SoC boards. It can be used as a standalone terminal UI (rtop) or imported as a Python library.
Features:
- Real-time monitoring of CPU, GPU, NPU, RGA, MPP, Memory, Temperature, Fan
- Thermal trip points and cpufreq/devfreq throttle visibility
- Fan speed and CPU governor control
- Board and SoC auto-detection
- Importable Python library
- Docker-compatible via Unix socket
- Graceful degradation — works even when some hardware is absent
Supported Hardware
| SoC | CPU | GPU | NPU |
|---|---|---|---|
| RK3588 / RK3588S / RK3588M | 4× A76 + 4× A55 | Mali-G610 | 6 TOPS (3 cores) |
| RK3582 | 2× A76 + 4× A55 | Mali-G610 | — |
| RK3576 | 4× A72 + 4× A53 | Mali-G52 | 6 TOPS |
| RK3568 / RK3568J | 4× A55 | Mali-G52 | — |
| RK3566 | 4× A55 | Mali-G52 | — |
| RK3399 / RK3399Pro | 2× A72 + 4× A53 | Mali-T860 | 3 TOPS (Pro only) |
Install
sudo apt update && sudo apt install python3-pip -y
sudo pip3 install -U rockchip-stats # standard
sudo pip3 install --break-system-packages -U rockchip-stats # Ubuntu 24.04+
From source:
git clone https://github.com/batuhanberkayaydin/rockchip_stats.git
cd rockchip_stats
sudo pip3 install .
After install, reboot once so your user is added to the rtop group.
Usage
rtop
| Key | Page | Description |
|---|---|---|
1 |
ALL | Overview dashboard |
2 |
CPU | Per-core load & frequency |
3 |
GPU | Mali GPU load & frequency |
4 |
NPU | NPU per-core utilization |
5 |
ENG | RGA & MPP hardware engines |
6 |
MEM | RAM, Swap, CMA |
7 |
CTRL | Temperature (with trip points), Throttle, Fan, Power |
8 |
INFO | Board & system information |
Python Library
from rtop import rtop
with rtop() as r:
while r.ok():
cpu = r.cpu
gpu = r.gpu
print(f"CPU: {cpu.get('total', 0):.1f}% GPU: {gpu.get('load', 0)}%")
Read all sensors once:
from rtop import rtop
with rtop() as r:
if r.ok():
for name, val in r.temperature.items():
if isinstance(val, (int, float)):
print(f"{name}: {val / 1000:.1f}°C")
for zone, data in r.thermal.items():
print(f"{zone}: {data['temp'] / 1000:.1f}°C")
for tp in data.get('trip_points', []):
print(f" {tp['type']}: {tp['temp'] / 1000:.1f}°C")
for i, core in enumerate(r.npu.get('cores', [])):
print(f"NPU Core{i}: {core.get('load', 0)}%")
More examples in examples/.
Docker
Install rockchip-stats on the host, then pass the socket into your container:
docker run --rm -it \
-v /run/rtop.sock:/run/rtop.sock \
ghcr.io/batuhanberkayaydin/rockchip_stats:latest
Architecture
rockchip-stats runs as a background service (root) that reads sysfs/procfs/debugfs and exposes data over a Unix socket. The rtop client connects to the socket and renders the TUI.
┌──────────────────┐ /run/rtop.sock ┌──────────────────┐
│ rtop (client) │ ◄─────────────────► │ rtop (service) │
│ curses TUI │ │ data collector │
└──────────────────┘ └────────┬─────────┘
│
sysfs · procfs · debugfs
Development
Run directly from the repo without installing:
sudo python3 -m rtop # normal
sudo python3 -m rtop --debug 2>debug.log # with debug output
sudo python3 -m rtop --no-service # without socket
sudo python3 -m rtop --force # start as service
To use repo changes immediately (editable install):
sudo pip3 install -e . --break-system-packages
sudo systemctl restart rtop
License
GNU Affero General Public License v3.0 — see LICENSE.
Acknowledgements
Inspired by jetson_stats by rbonghi.
Adapted and extended for Rockchip SoC platforms.
Metadata
Release files for rockchip-stats 0.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rockchip_stats-0.1.11.tar.gz | 83.1 kB | Details |
Release files / rockchip_stats-0.1.11.tar.gz
| Download URL | rockchip_stats-0.1.11.tar.gz |
|---|---|
| Size | 83.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b272e1fe6f89aee74bd84a123008791fc864cce663c4ab02bd65ef33e66ee59
|
|
BLAKE2b-256 checksum How to use checksums |
fa7ddf98ae9be742e0f0750621a776513a4be130de70ca0f1143648905f2b67d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|