Hardware-accelerated GTK4 + Cairo real-time Sound Open Firmware (SOF) DSP resource, memory, and task monitor for Linux host systems and remote DUTs (sof_remote_server).
sof-top tries the local SOF host first (reading read-only from Linux SOF DebugFS/SysFS, /proc/asound, or an explicit /dev/sof-dsp0 character device), and when no local device is available, disables the local option in the UI so you can connect to any remote sof_remote_server over SOFZ-compressed TCP.
- Moving DSP Core Utilization Graph:
- Rolling 60-second time-series graph of per-core CPU load (
Core 0..Nin%of DSP clock andKCPS) plus aggregate peak/average load. - Per-core summary cards showing clock frequency (
MHz), active state, average/peakKCPS, and utilization bars.
- Rolling 60-second time-series graph of per-core CPU load (
- Moving DSP Memory Utilization Graph (SRAM + DRAM):
- Rolling 60-second multi-trace time-series graph tracking:
- HPSRAM (
L2 High-Performance SRAMpowered banks, e.g.,24 x 128 KB = 3072 KB) - LPSRAM (
L2 Low-Power SRAMpowered banks, e.g.,1 x 64 KB = 64 KB) - DRAM (
L3 / IMR) (IMR / L3backing storage, e.g.,16,384 KBbudget +.l3_rodatafootprint + LLEXT DRAM heaps) - DSP Heaps (Combined active allocations across System, Runtime, Module, Shared, Buffer, and LLEXT heaps)
- HPSRAM (
- Side-by-side capacity gauges for
HPSRAM,LPSRAM,DRAM (L3/IMR), andDSP Heaps.
- Rolling 60-second multi-trace time-series graph tracking:
- Unified DSP Task List with Resources & Status:
- Consolidates Scheduler Domains (
LL/DP), Zephyr RTOS Threads (TEL2), Audio Processing Modules (IPC4/PMW2), and DAI Gateways into a single filterable, sortable table (Sort: CPU %,Memory KB,Type,Name) showing Task ID, Name/UUID, Type, Core, Status (ACTIVE,READY,RESIDENT,IDLE,GATED),CPU %,KCPS(avg/max),SRAM (KB),DRAM (KB), and Stack/Cycles/XRUN details.
- Consolidates Scheduler Domains (
sof-top requires Python 3.10+ and the following Python packages (listed in requirements.txt and pyproject.toml):
| Python Package | Version | Purpose |
|---|---|---|
PyGObject |
>= 3.42.0 |
Python GObject Introspection bindings (Gtk 4.0, Gdk 4.0, GLib 2.0, Pango 1.0, PangoCairo 1.0) |
pycairo |
>= 1.20.0 |
Cairo 2D vector graphics bindings for hardware-accelerated custom GTK4 widgets and headless PNG rendering |
sudo apt update
sudo apt install \
python3 \
python3-pip \
python3-gi \
python3-gi-cairo \
gir1.2-gtk-4.0 \
gir1.2-pango-1.0sof-top is directly executable (#!/usr/bin/env python3, chmod +x) — no need to prefix python3:
# Auto-connect to local SOF device via read-only DebugFS/SysFS (or prompt for remote host if none present):
./sof-top/sof-top
# Explicitly monitor local host (may need sudo if /sys/kernel/debug is mode 0700):
sudo ./sof-top/sof-top --local
# Connect to a remote DUT running sof_remote_server:
./sof-top/sof-top --host <hostname> --wake
# Connect to an explicit local character device (/dev/sof-dsp0):
./sof-top/sof-top --local /dev/sof-dsp0
# Headless high-DPI PNG snapshot export (for CI or reports):
./sof-top/sof-top --host <hostname> --wake --render-png /tmp/softop_user
# Command-line snapshot / streaming extractor (`sof-top-cli`, no GTK required):
./sof-top/sof-top-cli --list-elements
./sof-top/sof-top-cli --host <hostname> --wake --format json
./sof-top/sof-top-cli --host <hostname> --wake --stream -n 5 -i 200 --format jsonl -e summary,cores,memory.hpsram
./sof-top/sof-top-cli --host <hostname> --wake -e tasks.name,tasks.cpu_pct,tasks.avg_kcps --active-only --format text| Option | Default | Description |
|---|---|---|
-H, --host HOST |
(none) | Remote DUT hostname or IP running sof_remote_server (omit to auto-detect local host) |
-p, --port PORT |
9998 |
Remote TCP port for sof_remote_server |
-l, --local [DEV] |
(auto) | Local read-only DebugFS/SysFS telemetry, or explicit device path (e.g. /dev/sof-dsp0) |
-i, --interval MS |
250 |
Telemetry poll interval in milliseconds |
-w, --wake |
false |
Hold/wake DSP via PM runtime when polling telemetry (TCP / CDEV only) |
--render-png PATH |
(empty) | Render dashboard headlessly to PNG file and exit |
SPDX-License-Identifier: BSD-3-Clause — see ../LICENSE.