A btop-style terminal monitor that opens on an Overview (0): every page's answer on one
screen — what needs attention, CPU load, clocks, watts and temperature with every thread as a
mini bar, RAM, disks, network, the busiest and biggest programs and the sensors — and shows
every core's clock speed and load at once (1), grouped
by physical core and CCD, with temperatures, history graphs, themes and picture backgrounds,
plus a Memory & Storage page (m or 2) written for people who aren't Linux experts: how much
RAM is in use and whether that's fine, what the disk is doing now and did a minute ago, how full
each drive is, and which programs use the most memory, live; a Network & System page (3):
download and upload per link now and over the last minutes, the listening ports and who owns
them, connections, containers and services; a Processes page (4):
every process with its CPU, memory and disk use, as a list, grouped by program or as a tree, with
signals and nice; and a Sensors & Power page (5): every temperature by part with plain
names, the fans and how the board drives them, CPU / GPU / battery watts, voltages, and the
drivers it all comes from. Native Rust, one 1.4 MB binary, ~4 MB of RAM (< 5 MB even at 4K), and under 0.01 % of one CPU
thread (≈ 45–85 µs of CPU per second) at the default eco speed. Press s, + or - for
smooth (bars, digits and graphs all moving continuously at a steady 60 frames per second,
≤ 0.5 % of one thread) or fixed rates up to
60 updates per second.
The binary is static, so every package below runs on any release of its distribution, on
x86_64 and (apt, download) ARM64. After installing, optionally run
sudo cpuview --setup-sensors for fan readings and CPU watts on boards that need it (it shows
what it changes and asks first).
curl -fsSL https://aipulsedaily.github.io/cpuview/cpuview.gpg \
| sudo tee /usr/share/keyrings/cpuview.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cpuview.gpg] https://aipulsedaily.github.io/cpuview stable main" \
| sudo tee /etc/apt/sources.list.d/cpuview.list
sudo apt update && sudo apt install cpuviewsudo apt upgrade keeps it current; sudo apt remove cpuview removes it.
curl -fsSLo /tmp/cpuview.gpg https://aipulsedaily.github.io/cpuview/cpuview.gpg
sudo pacman-key --add /tmp/cpuview.gpg
sudo pacman-key --lsign-key 9BD5330AC96B3564D646E31AD64EA1E354AD066A
printf '\n[cpuview]\nServer = https://aipulsedaily.github.io/cpuview/arch/$arch\n' \
| sudo tee -a /etc/pacman.conf
sudo pacman -Syu cpuviewsudo pacman -Syu keeps it current; sudo pacman -R cpuview removes it.
Every release has
cpuview-<version>-x86_64-linux.tar.gz and …-aarch64-linux.tar.gz:
tar -xzf cpuview-*-linux.tar.gz
cd cpuview-*-linux && ./bin/cpuviewTo install it for your user: cp bin/cpuview ~/.local/bin/ and
mkdir -p ~/.local/share/cpuview && cp -r share/cpuview/wallpapers ~/.local/share/cpuview/.
In PowerShell (no administrator rights needed):
irm https://raw.githubusercontent.com/aipulsedaily/cpuview/main/install.ps1 | iexIt downloads the latest release's Windows zip (x86_64 or ARM64, whichever the PC is), checks
its SHA-256 against the one GitHub publishes, puts cpuview.exe and the wallpapers in
%LOCALAPPDATA%\Programs\cpuview and that folder on your PATH: open a new terminal and run
cpuview. Run it again to update (a running cpuview is fine). Then, optionally,
cpuview --setup-sensors for CPU temperatures, fans and voltages (see below). To remove it
(the sensor service too, if you installed it):
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/aipulsedaily/cpuview/main/install.ps1))) -UninstallOr by hand: every release has cpuview-<version>-x86_64-windows.zip (and …-aarch64-…):
unpack it anywhere and run cpuview.exe in Windows Terminal (the classic console window and
VS Code's terminal work too). No installer, no administrator rights, no Visual C++ runtime;
the wallpapers folder next to it holds the picture themes, settings go to
%APPDATA%\cpuview. (winget: later.)
From source: cargo build --release with the MSVC toolchain (rustup's default on Windows,
with Visual Studio's C++ build tools).
What Windows can and can't show. CPU load per thread, the clocks the cores really run at,
cores and their threads (P- and E-cores apart, as AMD's CCDs are), the power plan, RAM and
the page file, disks, volumes, the network, Windows' services (on the network page, where
Linux shows systemd's), processes (end, suspend, resume, priority), the CPU's power
(package, cores and, where the CPU counts them, its built-in GPU and RAM: Windows' energy
meter), graphics cards' temperature and fan (any vendor, as Task Manager shows them) and an
NVIDIA card's watts (NVML, which comes with its driver; ~14 MB of memory), the battery,
drives' temperatures (NVMe, and SATA drives' SMART temperature while they're spun up) and
the firmware's ACPI thermal zones all come from Windows itself. CPU temperatures and the
board's fans (CPU fan, case fans, pump), voltages and temperatures don't: Windows has no
interface for them without a kernel driver. cpuview --setup-sensors installs what it
takes, in one step: it shows what it will add and why, asks, then asks Windows for
administrator rights once and installs the signed PawnIO driver
(through winget), its signed modules and cpuview's own sensor service, a small service that
runs as SYSTEM, idles until cpuview asks and hands cpuview a read-only snapshot; --undo
removes all of it. The service reads the CPU's temperatures (Intel: the package and every
core; AMD: Tctl and each CCD) and the board's monitoring chip (Nuvoton NCT6779–NCT6799,
ITE IT87xx/IT86xx up to the IT8628 and Gigabyte's IT8792E/IT87952E, Fintek F718xx/F81xxx)
under the ISA-bus mutex other monitoring tools share. It only reads: the one thing it sets
is what the board's own firmware sets around each access (on NCT6791 and later, the lock
on the monitor's I/O window, opened for each read and closed again), and on ASUS boards the
fans carry their header names (CPU_FAN, CHA_FAN1, AIO_PUMP …) as on Linux.
cpuview --sensor-service --print (as an administrator) shows what it reads. Linux-only:
containers (Docker Desktop's run in WSL's virtual machine, out of Windows' sight), a server
board's BMC, per-core RAPL, RAM sticks' temperatures (their sensors share the SMBus with
RGB lighting software, which takes no lock cpuview could share), the "waiting for RAM"
pressure figure, Ctrl-Z. The load average is an estimate (the busy CPUs, decayed like
Linux's); processes' read / write counts are all their I/O (disk, network and pipes
together); services' CPU and memory come from Windows' full process list (18 ms with
15 000 threads), so they're read every 30 s (10 min in eco).
With a Rust toolchain (https://rustup.rs):
git clone https://github.com/aipulsedaily/cpuview.git
cd cpuview
./install.sh # builds, installs ~/.local/bin/cpuview and the wallpaper pack
cpuviewinstall.sh runs cargo build --release, copies the binary to ~/.local/bin/cpuview and the
wallpapers to ~/.local/share/cpuview/wallpapers/. If an older Python cpuview launcher is
there it is kept as ~/.local/bin/cpuview-py. The previous Python/Textual version lives in
legacy/python/ and still runs (legacy/python/install.sh).
Uninstall: rm ~/.local/bin/cpuview; rm -r ~/.local/share/cpuview ~/.config/cpuview. (A copy in
~/.local/bin runs instead of a packaged one, so remove it when switching to a package.)
The Overview (0, the default page) at 128×45 (a ~1180×880 px Windows Terminal window), eco
speed, real data on this Ryzen 9 9950X while idle. The strip at the top says what needs
attention ("all normal" here); each panel opens with its page's answer in its title, coloured
by health, and a click on it (or its number, top right) opens that page.
1: the CPU view at 128×45 (a ~1180×880 px Windows Terminal window), Midnight: graph band, all 32 threads in one column per
CCD with a load-history strip per thread, and the all-core load heatmap at the bottom. Real data on a
Ryzen 9 9950X. Captured headlessly: the app ran in a pseudo-terminal, its
output was replayed in a VT emulator (pyte) and painted with DejaVu Sans Mono.
The layout adapts from 40×12 to 4K: every core stays visible, and bigger windows get more history instead of longer bars. From a maximised 1080p window up (≈ 190×36 cells), a Memory & Storage column sits beside the CPU view, so both are visible without switching.
m: the Memory & Storage page at 128×45. Each panel opens with its answer in the title ("RAM
31% in use · 9.91 of 32.2 GB · plenty free", "disk reading 117 MB/s · writing 15 MB/s · 3%
busy", "storage system (/) 9% full · 1.59 TB free"), coloured by health. Rows read like the CPU
view's (label → value → bar → %) with a short plain hint. History charts say "over time", have
units on the y-axis, "… ago · now" along the bottom and the current value at the right edge: RAM
in use (with "rising: 18% 1 min ago, 31% now"), and disk activity as stacked columns (reading
below, writing on top, each column a 2–5 s average) with totals and the peak in words. Then every
real filesystem, and the programs using the most memory, live. Captured during a synthetic CPU
and disk load.
4: the Processes page at 128×45, smooth, grouped by program (G) and sorted by CPU (o). CPU %
is of one CPU thread (I: of the whole machine), memory is resident, disk is bytes read and
written per second (? where another user's process doesn't let us read it). The selected
process gets its whole command line, working directory, cgroup, and CPU and memory over the last
minute. The busy process is a test load (videoenc) running on this machine.
3: the Network & System page at 128×45 — what the network is doing now in the title, the
wired link's download and upload, its speed, address and totals since boot, the links that
aren't connected and the virtual ones; the traffic of the last ~2 minutes as stacked columns
(here a 2.5 MB/s ping flood about a minute ago) with the rates now at its right edge;
connection counts, the listening ports with what they listen on and the program or container
behind them, the busiest remote ends; the Docker containers' health, CPU, memory and network;
what the logged-in users run and the systemd services, busiest first.
5: the Sensors & Power page at 128×45 on the ASUS ProArt B850 / Ryzen 9 9950X it was built
on. Temperatures by part with plain names ("CPU chiplet 1", "motherboard", "RAM stick 2", "SSD",
"network eno1"), the chip's own name dim at the end ("Tccd1", "SYSTIN", "AUXTIN0"), a bar
against each sensor's limit, green / amber / red; unlabelled motherboard inputs that read
nonsense (−60 °C, 0 °C, colder than the board) are dropped. The two CPU fans with the speed the
board sets them to and their headers (CPU_FAN, CPU_OPT), the five empty headers in one line,
and how fresh the reading is (this board's sensor chip costs 2.5 ms of CPU a read). CPU power
here needs a one-time permission (cpuview --setup-sensors); the iGPU's own meter, voltages,
and every driver with what it shows.
415×105 (4K at 100 %): the CPU view with the Memory & Storage column beside it.
¹ The sixel pictures in these captures were decoded and composited by the capture harness, which answers the terminal queries like Windows Terminal (10×20 px cells) and applies its rule that text erases the image in its cell; not shown by a real terminal.
- Per-thread clock and load bars, two rows per physical core (t03 and its SMT sibling t19): load is the thick bar, clock a thin gradient line; idle threads fade back. Wide windows add a load-history strip per thread (2 s per cell)
- Grouped by CCD: one column per L3 domain with that CCD's temperature in the header (a "CCD1 61° ───" divider row when one column holds both), per-CCD load and clock in the sensors panel, and ◆ marks the scheduler's preferred core(s) (highest amd-pstate ranking)
- Adaptive layout, all cores visible without scrolling from 40×12 up: full rows (one per thread), compact rows (one per core: core clock, one load bar whose faded part is the load only one thread reaches, both loads) or micro rows (bar, clock, busiest thread), one column per CCD where it fits; the graph band appears whenever there is room (one-row graphs on short windows) and the title shows a live load / clock / temperature summary when it doesn't
- History: braille graphs for total load and average clock; in the bottom area an all-core
load heatmap (two cores per row, cool → hot) and, on big screens (4K), a per-core history
grid — clock over load for every core;
dswitches to the selected core's per-thread graphs - Detail statistics for the selected core: average / peak clock, time spent boosting, average load and the amd-pstate preferred-core rank
- Sensors: k10temp / zenpower / coretemp / cpu_thermal temperatures with their window maximum, governor and EPP, load average, busy and boosting thread counts, peak clock, and CPU power (package watts, and the RAM's where the CPU reports it; only those counters are read here)
- 10 themes with procedural backgrounds (Midnight, Aurora, Deep Ocean, Ember, Mono, Nebula, Night Forest, Space, Synthwave Sunset, Terminal background) and picture themes (8 bundled wallpapers, your own JPEG/PNG files, or a URL)
- Terminal graphics, detected over SSH: sixel (Windows Terminal ≥ 1.22, foot, WezTerm, Konsole, xterm vt340, tmux ≥ 3.4), kitty, iTerm2 inline images, truecolor or 256-colour block mosaics (octants, sextants, quadrants or half blocks), or the terminal's own background image. Pictures are shown whole and at the window's own pixel resolution behind the panels
- Mouse: click a core (in the list or the history grid) to select it, click a footer key, wheel in the theme menu
- No root, no daemon: reads
/proc/statand sysfs; works on any Linux x86_64 / aarch64 and degrades gracefully without cpufreq, hwmon, SMT or CCD information
The default page (0): one panel per page, each a compact summary with its single most
important answer first, in the pages' own grammar (a headline in the title coloured by health,
label → value → bar → note rows, charts with "… ago · now" time axes, stacked columns for
rates), so a glance answers "is this machine fine, and if not, what's wrong?".
- What needs attention, in a strip under the title bar, from the pages' own health rules, worst first, each opening its page when clicked: a temperature at its part's limit ("CPU at 95 °C — limited by temperature", "SSD too hot: 82 °C") or near it ("… hot"), a CPU fan that spun and stopped, RAM getting / nearly full (80 / 90 %) or programs waiting for it, swap active (≥ 1 MB/s), a filesystem ≥ 90 % full ("/ 92% full · 74 GB free"), no network link connected, packets lost, a container unhealthy or restarting, a battery under 20 % while discharging. Otherwise "all normal".
- CPU: % busy, average and fastest-core clock, package watts (when RAPL is readable) and temperature in the title and as rows; every thread as a mini bar (two per core, grouped by CCD, core numbers under them; one per core where threads don't fit), and the load over time. 3 columns (from ≈ 190×30): every core's load over time (the CPU view's heatmap).
- RAM as on the Memory & Storage page ("20% in use · 6.4 of 32.2 GB · plenty free"), swap and whether it's active, available memory, RAM in use over time with the trend in words.
- Disk: reading / writing now and % busy, the fullest filesystem (% full, free space), and activity over time as stacked columns.
- Network: download / upload of the links that are up ("quiet" below 10 kB/s), the main link, the containers' state and health ("5 running · all healthy") when there are any, and the main link's traffic over time.
- Programs: the busiest (CPU as a share of the whole machine, like the CPU's "busy") and the biggest (memory as the Memory & Storage page counts it), grouped by program.
- Sensors: the hottest part with its plain name and limit, the CPU fan, and power (CPU, GPU, battery).
- From 76 columns two columns of panels, from ≈ 190 three; big screens get taller bars and more history, small ones (under 76×18) one line per page with the threads' bars and, from ≈ 20 rows, the CPU load over time. Anything a machine doesn't have isn't shown (no containers, swap, RAPL, fans, sensors at all in a VM; batteries on laptops; ARM boards).
- Cheap: it reads only what it shows, on slow cadences in eco: the CPU and memory every
sample, the links every 10 s (a read of
/proc/net/devcosts ~50 µs here), processes from a scan every 90 s with the busiest followed every 6 s (and the memory page's program scan every 3 minutes), containers every 2–5 minutes, temperatures every 30 s, CPU power as the Sensors page does, and a board's sensor chip (2.5 ms a read on this Nuvoton chip) every 10 minutes, with the minute around that read sampled more slowly so no 60 s window goes over the budget. RAM sticks and drives come from the memory page's helper thread (their SMBus / admin reads block for milliseconds).
Made to be read at a glance by someone who isn't a Linux expert: every panel was checked with
fresh readers who saw only a screenshot and had to answer what it says. Sizes are decimal (1 GB = 10⁹
bytes, like disk makers and df -H; the RAM total reads 32.2 GB on a "32 GB" machine), and
every rate is in MB/s, so all of them compare directly.
- One answer per panel, in its title and coloured by health (green fine, amber watch, red act): RAM "31% in use · 9.91 of 32.2 GB · plenty free" (amber from 80 % in use, or when programs wait for RAM ≥ 5 % of the time, or swap traffic ≥ 1 MB/s with less than 20 % available; red from 90 % / 20 % / 20 MB/s: "getting full", "nearly full", "RAM is tight"); disk "reading 117 MB/s · writing 15 MB/s · 3% busy", or "idle · nothing being read or written"; storage "system (/) 9% full · 1.59 TB free" (amber from 90 %, red from 95 %); drive temperature OK / warm (70 °C) / too hot (80 °C), RAM sticks OK / warm (70 °C) / hot (85 °C).
- RAM: in use (what
freecalls used: total − available) with a bar and %, available ("free for programs now"), cache ("files kept for speed, part of available"), swap with a bar and whether it is active ("no activity (fine)", "little activity", "busy 3 MB/s"), "waiting" (PSIsome avg10: the share of time programs waited for RAM), RAM stick temperatures (spd5118/jc42). A chart of RAM in use over time (0–100 %, a line with a soft fill, no cache slab) says the trend in words: "rising: 18% 1 min ago, 31% now". - Disk activity (physical disks only: no partitions, loop, dm, md, zram, optical or eMMC boot
areas): reading ("programs loading files") and writing ("programs saving files") in MB/s over
~1 s, busy % (time the disk was working), temperature (
nvme/drivetemp) and model. The disk activity over time chart is a stacked column chart, not a waveform: each column is the average of 2–5 s (aligned so columns step once per bucket and never change in between), reading below and writing on top in two colours the theme can't make alike, a round MB/s scale (1-2-3-5 steps, 10 MB/s at least, so an idle disk is a flat line labelled "idle"), the current rates at the right edge, and in words: "read 95 GB · written 1.9 GB in the last 2 min · peak 2731 MB/s 45 s ago · 1 min ago 2650, now 133 MB/s". Three or more disks: one line each and one chart of all of them. - Storage: every real filesystem once (no tmpfs, snaps, overlays, network mounts or bind
duplicates): "1.59 TB free", a bar, "9% full" (
df's use %), then "system & home · 152 GB used of 1.84 TB · ext4 · device". - Top programs by memory, live: processes grouped by program ("postgres ×27 613 MB": each
process's private memory plus the largest shared part once, since shared libraries and shared
memory sit in RAM once);
pshows each process instead. Rows keep their place unless another is clearly bigger (3 %, 2 MB), and in smooth mode cross-fade when they trade places; sizes count smoothly. - Small windows keep the answers and drop charts first: a chart becomes a one-line history with words ("1 min ago ▁▂▃▅ now · rising 19% → 31%", "· peak 2723 MB/s 46 s ago"), storage can shrink to the root filesystem ("+ 2 more"). From 100 columns the page has two columns; from ≈ 190×36 the column joins the CPU view.
- Works on any Linux machine: no swap ("swap none · no swap set up"), zram swap ("swap zram"), no sensors (no temperature rows), no PSI (no "waiting" row), NVMe / SATA / HDD / eMMC / virtio, any number of disks and filesystems, long mount paths.
- Every process: PID, user, CPU % (from
utime + stimeover the last second, of one CPU thread or, withI, of the whole machine), resident memory and % of RAM, disk read / write per second (/proc/<pid>/io), threads, state and age; the command line after the name. Columns drop out as the window narrows (age, disk, threads, state, % RAM, bar, user, PID) - Sort by CPU, memory, disk, PID or name (
o,rreverses, or click the column titles); near-ties don't flip-flop: a new value counts at once past a margin (CPU: 2.5 points or 20 %, memory 2 %), otherwise only once it has lasted 4 s - Group by program (
G, on by default):postgres ×31with summed CPU, memory, disk and threads;enter/→expands a group,←folds it. Tree (T): children under their parents, foldable the same way. Filter (/): name, command line, user or PID;escclears it - Detail strip for the selected process (or group): whole command line, parent, user, state, threads, nice, age, swap, the PID inside its container, working directory, cgroup, and CPU and memory charts for the last 60 s
- Signals (
korF9: TERM, KILL, HUP, INT, STOP, CONT) and nice (n) go through a dialog and never happen withoutenter; a process is identified by PID and start time (and signalled through a pidfd), so a reused PID is never hit; refusals are spelled out (another user's process, raising priority without root, already exited) - Any Linux, any user: with
/procmountedhidepid=2you see your own processes and a note says why; unreadable files show?; kernel threads are counted and hidden (Kshows them); zombies show<defunct>; long command lines are cut with…; names with spaces and parentheses parse; thousands of processes are fine (~150 bytes each: under 5 MB of RAM with 5,400 processes); user names from/etc/passwd, LDAP / sssd users through the system's user database; no systemd needed - Live and smooth: in smooth mode the rows on screen are re-read 2.5 times a second (their
statandstatmstay open), CPU % is over the last second, digits count and bars glide, rows slide to a new place over ~0.3 s instead of jumping, new processes fade in and exited ones fade out. In eco the rows shown are re-read every 4 s and the whole list every minute
Everything is detected at run time; what a machine doesn't have simply isn't shown (no Docker, no systemd, no Wi-Fi...). No root needed, no extra packages.
- Links: the panel title answers "what is the network doing" (download and upload now,
"quiet" in green, "not connected" in red, "packets lost" in amber). Each physical link
(wired, Wi-Fi), VPN / tunnel (WireGuard, Tailscale, tun, PPP), bond and VLAN: download and
upload now, link speed, address (global ones first), totals since boot, Wi-Fi signal
(
/proc/net/wireless, "weak" in amber) and packets lost (dropped or broken) only when there are any — in amber only while they grow. Links that are down share one line; bridges and veths (docker0,br-…, container links) one more. Inside a container or VM without a physical link, its virtual links are the network. - Over time: the Memory & Storage page's chart grammar — a caption ("eno1 traffic, last 2 min 16 s · each column = 4 s average"), a legend, stacked columns (download below, upload on top) on a round 1 / 2 / 3 / 5 × 10ⁿ scale with labelled y-axis ticks in B/s · kB/s · MB/s, the rates now at its right edge and "2 min ago · 1 min ago · now" in the panel's bottom border. Columns are whole buckets of the history, so they step left once per bucket and never wobble.
- Connections & ports: open connections and those closed in the last minute (TIME_WAIT),
from
/proc/net/snmpand/proc/net/sockstat(constant cost); the listening TCP / UDP ports (sock_diag netlink, listening sockets only), merged per port, with where they listen (all addresses, this computer only, one address) and who owns them: the container that publishes the port (Docker / Podman API), else the program (socket inode →/proc/<pid>/fd, looked up a few processes per sample and only for sockets you may see;?otherwise), else the systemd unit or cgroup the socket was opened in (its cgroup id, readable without root); and the remote ends with the most connections, named when they are a port on this computer (its container or program) or a well-known service. - Containers (only if there are any): Docker, Podman (rootful and rootless), LXC,
systemd-nspawn / libvirt machines and Kubernetes pods, found in the cgroup tree (v2, or v1
with the cgroupfs or systemd driver). Per container: CPU (100 % = one core, as
docker stats), memory (less inactive page cache, asdocker stats), network in / out from a member process's/proc/<pid>/net/dev("host network" when it shares the host's), sorted by CPU. Names, state and health ("healthy" / "starting" / "unhealthy" in red, "restarting" in amber) from the Docker or Podman API over its unix socket (oneGET /containers/json, parsed by a small field extractor), else Docker'sconfig.v2.jsonwhen readable, else the short id. - Services (only if there are any): systemd services (
system.slice/*.service) or OpenRC services (openrc.*cgroups), busiest first, then the biggest, with CPU and memory, plus everything the logged-in users run (user.slice) on its own line above them. No failed-unit count: that needs D-Bus. - Lists keep their order until an item clearly overtakes the one above it, and rows slide to their new places in smooth mode; numbers count and bars glide.
- 40×12 shows the link's rates and the containers' count and health; from 100 columns the page has two columns.
Everything is found at run time, on any Linux machine: hwmon chips, thermal zones (Raspberry Pi and other ARM boards), RAPL energy counters (powercap or perf), batteries and mains power; what a machine doesn't have isn't shown, and a virtual machine says the host has them. Nothing is read for the page while it isn't shown.
- Temperatures grouped by part — CPU (Tctl / Tdie and each chiplet on AMD, the package and every core on Intel, the SoC on ARM), motherboard & chipset, memory (each DDR5 / DDR4 stick's own sensor), storage (NVMe, SATA via drivetemp), graphics, network chips and Wi-Fi, other — each with a plain name, its value, its highest in the last 2 minutes, a bar against its limit (the chip's own max / crit when they are sane, else a default for that kind of part) in green / amber / red, and the chip's name for it dimly beside it. Motherboard chips' unlabelled inputs that read nonsense are dropped: placeholders at 0 °C, disconnected inputs at −60 / −128 / 127 °C, and inputs colder than the board itself by more than 8 °C (nothing inside a running computer is). Unlabelled inputs that look real stay, marked as such, and don't count for the panel's verdict. Small graphs of the key ones over the last few minutes.
- Fans: speed, a bar against the fastest seen (or what the duty cycle suggests at 100 %), the duty the board sets ("board sets 42 %", "fixed at 60 %", "full speed") and the header: ASUS / Nuvoton boards' CPU_FAN, CPU_OPT, CHA_FAN… (a "?" where the header is a guess), labels from Dell, ThinkPad, Apple and ASUS EC drivers; otherwise "fan 3". Headers with nothing connected share one line. A CPU fan that spun and reads 0 turns the headline red. Speed over time with both CPU fans.
- Server boards (Supermicro, Dell PowerEdge, HPE, …): the BMC runs the fans and has its own
temperature and voltage sensors, which no hwmon driver shows. cpuview reads them through the
kernel's IPMI device (
/dev/ipmi0): the sensor list once (cached in~/.cache/cpuview/bmc-sdruntil the BMC's list changes), then the readings without ever waiting for the BMC (each read collects the answers to the last one's requests). The device is root-only;cpuview --setup-sensors --bmc(below) gives it to your user. - Power: CPU package watts and, where the CPU counts it per core (AMD Zen, through perf),
each core and "cores vs the rest of the CPU"; Intel's core / uncore / DRAM / platform domains;
the GPU's own meter (amdgpu, nouveau, Intel energy counters); a laptop's battery (watts,
charge, charging or not, time to empty / full) and mains. RAPL counters wrap (handled with
max_energy_range_uj) and tick about once a millisecond, so watts come from windows of at least 0.4 s. Counters are root-only on most distributions: the page then says so andcpuview --setup-sensors(below) makes them readable. - Voltages compactly: the CPU core (Vcore), +12 V / +5 V through Nuvoton's usual dividers (only where that gives a plausible value), 3.3 V, standby, the CMOS battery, the GPU's and SoC's rails; only rails outside limits the chip sets stand out.
- Sensor sources: every driver (two DIMM sensors are "spd5118 ×2"), what it is and shows,
the board (DMI), how CPU power is read or why not; with no fan sensors, the driver this
board's maker usually needs (nct6775, it87, asus_ec_sensors, asus_wmi_sensors,
dell_smm_hwmon, thinkpad_acpi, applesmc, …, found by DMI vendor, not modinfo) and whether
it's installed, else
sudo sensors-detect; on a board with a BMC, that the BMC runs them. cpuview never loads modules itself. - 40×12 shows the temperatures and the fans; from 100 columns the page has two columns, from 200 three.
cpuview --setup-sensors shows the shell commands it would run as root, each with what it
changes and why, asks, and only then runs exactly those with sudo (--dry-run only shows
them; --undo reverses everything it did):
- the board's fan driver, if one is known and installed but not loaded: loaded now and, only
if it finds the fan chip, written to
/etc/modules-load.d/cpuview-<module>.conffor every boot (a driver that finds nothing is left out and the other steps still run); - CPU power: a udev rule (
/etc/udev/rules.d/70-cpuview-rapl.rules) that makes the RAPLenergy_ujcounters readable by everyone at every boot, and the same now. Caveat: RAPL readings can leak information about what other users' programs do (power side channels, e.g. the 2020 PLATYPUS attack), which is why distributions lock them down; on a single-user machine that is no concern; - with
--bmc, on a server board: a udev rule (/etc/udev/rules.d/70-cpuview-ipmi.rules) that makes the BMC's device (/dev/ipmi0) yours at every boot, and the same now. Caveat: the device takes any IPMI command, not only readings, so whoever opens it can also power the machine off or change the BMC's users and network; the rule gives it to your user alone (who can already do that with sudo), not to everyone; - with
--per-core: the perfmon capability on the installed binary, for per-core power through perf (the kernel'sperf_event_paranoidallows it only that way). File capabilities are lost when the binary is replaced, so redo it after every./install.sh; the udev rule alone gives the package's watts.
| Key | Action |
|---|---|
↑↓←→ / hjkl / click |
select a core (columns run top to bottom) |
s |
update speed: eco → smooth → 1 → 2 → 4 → 10 → 20 → 30 → 60 per second → eco |
0 1 2 3 4 5 / tab / shift-tab |
pages: Overview, CPU, Memory & Storage, Network & System, Processes, Sensors & Power (remembered; a fresh install opens on the Overview; --page overview|cpu|memory|network|processes|sensors; the footer's tabs are clickable, and so are the Overview's panels) |
m |
Memory & Storage page ⇄ CPU view |
p |
Memory & Storage: top programs by memory ⇄ each process |
+ / - |
faster / slower (= works as +) |
o |
sort cores: number → load → clock |
c |
view: auto → full → compact |
g |
show / hide the history graphs |
d |
bottom area: all-core history (heatmap / grid) → selected core's graphs → hidden |
enter |
show / hide the bottom area |
r |
reset peak clocks |
space |
pause (stops sampling entirely) |
t |
theme menu |
q / ctrl-c |
quit (ctrl-z suspends) |
On the Processes page (4) the arrows, pgup / pgdn / home / end, the mouse wheel
and clicks move the selection, and these keys change meaning (the global ones — q, space,
s, + -, t, 0–5, tab — still work):
| Key | Processes page |
|---|---|
o / r |
sort column: CPU → memory → disk → PID → name / reverse |
/ |
filter by name, command, user or PID (enter keeps it, esc clears it) |
G / T |
group by program (default) / tree |
enter / → / ← |
expand / fold the selected group or branch |
k or F9 |
send a signal (TERM, KILL, HUP, INT, STOP, CONT): choose with ←→, enter sends, esc cancels |
n |
change nice (←→ or - +, enter applies) |
I |
CPU % of one CPU thread ⇄ of the whole machine |
K |
show / hide kernel threads |
k is "up" on the CPU page (vim keys); on the Processes page it opens the signal dialog, as in
top and htop, which is safe because nothing happens before enter.
Theme menu: ↑↓ preview live, enter apply, esc cancel, ←→ picture brightness,
b blur, m image mode, a add a picture (path or URL).
Speed is shown in the title bar (● live eco, ● live smooth, ● live 10/s) and the footer,
and is remembered in ~/.config/cpuview/config; cpuview --speed smooth (or 10, …) sets it
from the command line. Except in eco the title clock shows seconds; history graphs always get
one point per second.
Smooth is made to look live: everything that changes moves continuously instead of jumping, on a fixed frame grid.
- Frames: a steady 60 frames per second on a fixed clock grid (the 10 samples a second fall on it), one write per frame wrapped in synchronized-output marks, nothing written when nothing changed. Every frame advances the animation by exactly one grid step, so motion per frame is even whatever the wakeup jitter. Every other frame touches only the core cards (bars and their digits); panels and graphs change on the others.
- Bars follow critically damped springs (no overshoot) whose targets move 10 times a second; with the spring slow against the sample rate the motion is C1-continuous (no start-stop pulses: velocity ripple under ~10 %). The bar end is anti-aliased in 1/16 cell steps, blended in linear light so it glides at an even perceived speed across a cell.
- Load blends two windows of
/proc/stat(which counts in 10 ms ticks): 0.8 s (±1 %) while it agrees with 0.2 s (±5 %) within the noise, the short one as they disagree. Quiet bars stay still; a step 10 % → 80 % reaches 90 % in ~0.45 s. Changes below ±0.8 % load / ±1.5 % clock don't move a bar. A disagreement within the short window's noise counts only if the sample before agreed in sign, and once a step or ramp has ended the bar settles on a 0.4 s window: ramp ends no longer overshoot (they did by ~3 %, about 0.4 cell, before settling). - Digits count along with their bar (90 → 91 → … → 99), with hysteresis while it moves so a value near a rounding edge never flickers; exact once it rests. Totals, CCD figures and temperatures (read every second, eased over ~1 s) do the same; colours follow the digits.
- Graphs keep every per-second point on its own braille dot column and move it one column when the next point arrives; only the newest column is live (the number as shown, held to whole dots, so it can't flicker at a dot's edge). An earlier version slid the points by the sub-second phase, which made every column alternate between a point and the mean of two neighbours once a second: one-point peaks shrank and regrew and one-dot features blinked off and on. Checked frame by frame: no cell changes and returns within 6 frames in 40 s runs at 128×45 and 172×40, CPU view and Memory & Storage, Midnight and a picture theme.
- Pictures: the picture is sent once (start, resize, theme change); a cell that turns blank shows the picture drawn with block glyphs and gets its pixels at the next patch tick (4 a second) once it has stayed blank a full tick, never mid-animation. Cells of the busy areas (graphs, bars) wait three ticks, at most 96 of them a tick (eco: until the next sample, at most 128).
Measured from frame-by-frame captures at 128×45 (one thread driven by a 10 ms duty-cycle load, bar length read back from the edge cell's colour), previous smooth → now: frame intervals p95 / median 1.95 → 1.01–1.02 and longest gap 80–100 → 19 ms while bars move; a 10 % → 80 % step reaches 90 % in 0.80 → 0.44 s with no overshoot; on a 3 s ramp the share of frames where the bar stands still 29–41 % → 12–15 % (the rest of those are sub-1/16-cell steps) and velocity variation (50 ms bins) 0.58–0.63 → 0.35–0.40; graphs update 0.5 → 4–6 times a second with ≤ 2 cells a frame instead of a 20–35-cell jump every 2 s; quiet threads' digits change 0.3–0.6 times a second (max 1.8), bar reversals unchanged (≤ 1.2/s).
Clocks in smooth mode are the clock while running: see
Load and clock accuracy. Should frames cost more than 5 ms of CPU per
second for 3 s in a row (huge windows), the frame rate halves, and stays constant from there;
CPUVIEW_FPS=30 sets it.
cpuview --theme nebula
cpuview --image ~/Pictures/wall.jpg # copied to ~/.config/cpuview/images/
cpuview --image https://example.org/photo.jpg # downloaded with curl (15 s, 25 MB max)Any JPEG or PNG in ~/.config/cpuview/images/ shows up in the theme menu. From Windows
PowerShell:
scp .\pic.jpg you@yourserver:~/.config/cpuview/images/A picture theme takes its palette from the picture (load and temperature colours keep their
meaning). The theme menu shows the credit of the bundled pictures (wallpapers/CREDITS.md: NASA
public-domain photos and CC0 scenes).
The picture fills the window, at the window's resolution. By default the picture covers
the whole window (fit = cover), cropped around its subject: each bundled wallpaper names its
own (the synthwave sun and horizon, the earth over the moon, …), and for your own pictures
cpuview finds what stands out (edges, contrast and colour, weighted to the middle) when the
picture loads. image.<file>.focus = x,y sets it by hand; fit = contain shows the whole
picture instead, with soft margins. In sixel and kitty mode every cell without text shows real
pixels, including the empty space inside the panels, the graph grid and the bars' tracks;
panel frames and graph grid lines are drawn into the picture. Text cells can't hold pixels in
sixel terminals (writing a character erases the picture in that cell), so they get the
picture's colour there. In blocks mode, and for cells that change too often for a pixel
patch, the picture is drawn with block glyphs: octants (2×4 per cell), sextants (2×3),
quadrants or half blocks, whichever the terminal draws itself (glyphs = auto, see --doctor).
Data stands out from the picture. The light glass (the default) dims the picture's highlights — a soft knee caps its luminance at 7 % (a sun turns deep amber, a night sky stays as it is) — and every text colour is made at least 4.5:1 against that, every frame, bar and graph stroke 3:1 (WCAG AA), in the picture's own hues: labels, frames and graphs take the picture's accent colours, made light enough to read. Each cell is checked again against what is really behind it; text only ever gets lighter, never dark (dark text sinks into a picture). The built-in themes get the same guarantee against their own panels.
| setting | values | |
|---|---|---|
glass = / --glass / g in the menu |
light (default), clear, frosted |
light: highlights dimmed so every colour reads (above); clear: the picture as it is (text gets plates where it must); frosted: blurred, darker panels |
image.<file>.fit = / --fit / f in the menu |
cover (default), contain |
fill the window around the subject, or the whole picture with soft margins |
image.<file>.focus = x,y |
0..1 each, e.g. 0.5,0.3 |
what stays in view when cropping (default: the wallpaper's own, or found in the picture); where the picture sits in the margins (contain) |
glyphs = / --glyphs |
auto, octant, sextant, quadrant, half |
block glyphs for pictures drawn with characters |
image.<file>.dim / .blur |
←→ / b in the menu |
brightness, blur |
Pictures stay on disk; the binary embeds only the theme definitions (themes/*.toml, compiled in |
||
by build.rs). |
--image-mode auto|kitty|sixel|iterm|blocks|blocks256|terminal|off (remembered; m in the menu).
auto asks the terminal what it can do (works over SSH, where TERM_PROGRAM and COLORTERM are
usually not forwarded) and picks kitty → sixel → iTerm2 → truecolor half-blocks → 256 colours →
off. Truecolor is detected with a DECRQSS echo, not from the environment. The probe never waits
more than 300 ms (1 s once replies start arriving) and late replies are ignored by the input
parser.
$ cpuview --doctor
terminal (no XTVERSION reply)
TERM xterm-256color COLORTERM=(unset) ssh=yes
replies yes in 41 ms DA1=[61, 4, 6, 7, 14, 21, 22, 23, 24, 28, 32, 42, 52]
truecolor yes (DECRQSS echoed)
sixel yes
cell size 10x20 px (CSI 16 t)
window 128x45 cells, ioctl pixels 640x480, CSI 14t Some((1280, 900))
→ image mode sixel (DA1 lists 4 (sixel))
→ glyphs sextant (Windows Terminal draws sextants)
(that is what Windows Terminal over SSH looks like; --doctor then draws a test strip in the
chosen mode). Windows Terminal draws sixel at a fixed 10×20 px per cell and scales it to the
font, so a 128×45 window is a 1280×900 canvas whatever the font size. Pixel data is sent once
on start, resize and theme change: one picture for the whole window, which text then erases
cell by cell, and afterwards small patches for cells that turn blank. Unchanged cells are never
rewritten, so the picture survives live redraws.
What a terminal can't do: in sixel terminals (Windows Terminal included) a cell holds either
pixels or a character, never both, so the picture can't continue under text. kitty and
Ghostty layer the picture under the text (kitty graphics with a negative z-index); WezTerm
speaks that protocol too, but text over an image still erases it there (wezterm#7222), so it
gets sixel. Windows Terminal has no kitty graphics (as of 1.25). Its profile backgroundImage
is the other way to get a picture under every character (--theme transparent, below).
Windows Terminal background image: cpuview --theme transparent leaves every cell at the
terminal's default background so a backgroundImage set in the Windows Terminal profile shows
through (setup in docs/image-themes.md).
/proc/stat counts CPU time in USER_HZ ticks of 10 ms. Sampled 60 times a second, a CPU
gets only one or two ticks per interval, so its load can only read 0, 50 or 100 % — a thread
running 3 ms of every 10 ms flickered between 0 and 100 %, and idle threads jumped to 100 %
whenever they ran briefly. cpuview therefore computes load over a sliding 0.5 s window at
every speed (a ring of /proc/stat snapshots; the base is the newest one at least 0.5 s old,
so slower speeds simply use the previous sample): ≥ 48 ticks per CPU, ±2 points. Checked with
a pinned 3 ms busy / 7 ms sleep load (true duty 29.9 %, confirmed by the CPU's run time in
/proc/schedstat), displayed value of that thread over 8 s:
| speed | before | now |
|---|---|---|
| 60/s | 0 – 100 % | 29 – 31 % |
| 10/s | 22 – 30 % | 28 – 31 % |
| smooth | – | 29 – 30 % |
Before, at 60/s, threads that /proc/schedstat showed at most 5 % busy jumped to 50–100 %;
now every idle thread's peak matches its real run time within a few points.
Clocks come from scaling_cur_freq, which for a lightly loaded thread flips between the idle
floor (0.62 GHz here: the thread happened to be idle at its last tick) and its running clock
from one read to the next. Fixed speeds show the raw reading. Smooth shows the clock while
running: readings above the floor are averaged and held for 1.5 s, and a thread drops to the
floor only after 1.5 s without one.
The default eco speed is the one held to 0.01 %; the others trade CPU for liveliness
(172×40, Midnight, output to a continuously read pseudo-terminal, load average 2–3 from other
work; smooth and eco 60 s runs, fixed speeds 20 s):
| speed | samples/s | frames/s | CPU per second | % of one thread | output |
|---|---|---|---|---|---|
| eco (default) | ~0.5–1 | ~0.4 | 83 µs | 0.0083 % | 2.0 KB/s |
| smooth | 10 | 60 (steady; fewer when nothing moves) | 2.7 ms | 0.27 % | 33 KB/s |
| 1/s · 2/s · 4/s | 1 · 2 · 4 | same | 0.17 · 0.32 · 0.46 ms | 0.017 · 0.032 · 0.046 % | 3–13 KB/s |
| 10/s | 10 | ~9 | 0.89 ms | 0.089 % | 7 KB/s |
| 20/s · 30/s · 60/s | 20 · 30 · 60 | ~18 · 27 · 51 | 2.0 · 2.7 · 5.2 ms | 0.20 · 0.27 · 0.52 % | 31 · 25 · 68 KB/s |
Smooth, 60 s runs at 128×45 · 172×40: Midnight 2.2 · 2.7 ms/s and 30 · 33 KB/s; NASA Webb picture (sixel) 3.4 · 3.6 ms/s and 38 · 27 KB/s; ≤ 3.3 KB per frame (builds before the whole-picture rework below). (The previous smooth: 1.0 – 2.3 ms/s at ~20 – 50 irregular frames/s.) Its cost is mostly the 60 wakeups a second: on an idle machine a bare wakeup of a cache-cold core costs 20–30 µs (3–6 µs when the CCD is busy). Fixed-speed cost depends mostly on how many cells change, so a busier machine costs more.
Sample rates were confirmed by counting /proc/stat reads with strace. Details for eco:
Measured on this machine (Ryzen 9 9950X, Linux 7.0, output going to a pseudo-terminal that is
continuously read, 60 s after a 10 s warm-up, CPU time = sum of /proc/<pid>/task/*/schedstat
field 1 in nanoseconds), while another workload kept the load average at 1.4–3.7:
| 60 s run | CPU per second | % of one thread | RSS |
|---|---|---|---|
| Midnight, CPU view: 128×45 · 415×105 (4K, with the memory column) | 82.1 · 95.8 µs | ≤ 0.0096 % | 3.9 · 4.9 MB |
| Midnight, Memory & Storage page: 128×45 · 415×105 | 83.5 · 90.6 µs | ≤ 0.0091 % | 4.1 · 4.8 MB |
| the same, the build before the clearer memory page: CPU view · memory page 128×45 | 82.1 · 82.1 µs (load 2.3) | ≤ 0.0083 % | 4.1 MB |
| Midnight, the build before the memory page: 128×45 · 172×40 · 415×105 | 83.6 · 82.7 · 77.4 µs | ≤ 0.0084 % | 3.8 · 3.9 · 4.7 MB |
| Midnight (default), 172×40, earlier builds | 68.6 · 71.3 · 82.1 µs | ≤ 0.0082 % | 3.9 MB |
| Space · ISS aurora picture (sixel) · Midnight 120×30, earlier build | 73.4 · 63.8 · 73.3 µs | ≤ 0.0073 % | 4.0 · 7.2 · 3.8 MB |
| Midnight, Processes page (~130 processes, load 6–7): 128×45 · 415×105 | 68.3 · 68.6 µs | ≤ 0.0069 % | 4.0 · 5.0 MB |
Processes page, smooth, 60 s at 128×45 · 172×40 with a load average of 7: 2.8 · 2.8 ms/s, 18 · 22
KB/s, frames on the 60 fps grid (the base Memory & Storage page under the same load: 3.2 ms/s).
With 5,400 processes it stays at 4.7 MB of RAM (128×45). A full scan of every process's stat
costs ~1–1.5 ms here, so smooth does one about every 1–4 s (spaced by its measured cost), eco
every minute or more; nothing is read for the page while it isn't shown.
(The rows above were measured while other monitors and builds kept the load average at 3.6–3.8.)
Smooth, 40 s runs at 128×45 · 172×40 under the same load: Memory & Storage page Midnight 3.4 · 3.5 ms/s and 7 · 7 KB/s, NASA Webb picture (sixel) 3.2 · 3.3 ms/s and 11 · 10 KB/s; CPU view 3.7 · 3.9 ms/s and 66 · 73 KB/s, 4.2 · 4.2 ms/s and 53 · 52 KB/s; frames stay on the 60 fps grid (consecutive frame intervals p95 / median 1.03–1.04, ≤ 0.1 % off the grid; builds before the whole-picture rework).
Picture themes, whole picture at the window's resolution (synthwave picture, sixel with Windows Terminal's replies, 60 s runs, load average 1.5–3.6 from other work):
| 128×45 | 209×51 | 415×105 | |
|---|---|---|---|
| eco, CPU view · overview | 60.1 · 56.1 µs/s | 52.4 · 55.3 µs/s | 56.6 · 79.3 µs/s |
| eco, the build before (cropped, blurred, half blocks) | 67.3 · 89.4 µs/s | 54.1 · 115.6 µs/s | 73 · 302 µs/s |
| RSS (eco, CPU view), before → now | 6.5 → 5.5 MB | 8.8 → 6.8 MB | 22.8 → 8.1 MB |
| smooth, CPU view · overview | 4.2 · 3.8 ms/s, 73 · 14 KB/s | 4.4–4.7 · 4.8 ms/s, 67 · 36 KB/s |
Pictures that fill the window, legible everywhere (cover with a focus point, the light glass's highlight cap and the 4.5:1 / 3:1 palette; synthwave picture, sixel with Windows Terminal's replies, 60 s runs, load average 1.2–2.5 from other work):
| 128×45 | 209×51 | 415×105 | |
|---|---|---|---|
| eco, CPU view · overview, picture | 56.8 · 66.4 µs/s | 57.0 · 65.7 µs/s | 54.8 · 71.5 µs/s |
| eco, CPU view · overview, Midnight | 64.1 · 62.4 µs/s | 68.5 · 66.7 µs/s | 60.0 · 66.5 µs/s |
| RSS, picture (CPU view) | 4.3 MB | 5.6 MB | 6.5 MB |
| RSS, Midnight (CPU view · overview) | 3.0 · 3.3 MB | 3.3 · 3.3 MB | 4.1 · 3.7 MB |
| smooth, picture, CPU view · overview | 4.4 · 4.6 ms/s, 95 · 26 KB/s | 4.8 · 4.7 ms/s, 88 · 36 KB/s |
Smooth frames stay on the 60 fps grid (p95 / median ≤ 1.04, ≤ 0.42 % off the grid), no blinks.
The resident size dropped by about a megabyte everywhere: a few seconds after start (and after
a page or theme change) cpuview drops its code pages from its resident set (madvise, they stay
in the page cache and the ones in use come straight back), so start-up code — argument
parsing, terminal probing, picture decoding — no longer counts for as long as it runs.
Contrast, measured cell by cell on the captures against what is really behind each one (the
cell's colour, or the picture's pixels around a frame or bar drawn into it): text ≥ 4.5:1 in
100 % of cells, frames, bars and graph strokes ≥ 3:1 in ≥ 99.5 % (the build before: 63–69 % and
10–21 %).
NASA ISS photo, eco CPU view: 57.0 (128×45) · 56.5 (172×40) · 77.9 (209×51) · 47.1 µs/s (415×105). Smooth frames stay on the 60 fps grid (p95 / median ≤ 1.04, ≤ 0.6 % off the grid). The picture itself is sent once: about 0.8 MB at 128×45 and 4 MB at 415×105 for the synthwave picture (1.1 / 6.5 MB for the Webb photo); the hi-res copy kept for patches is one byte per pixel at no more than the picture's own resolution (1.15 MB at 128×45, 2.3 MB at 4K).
Binary: 979,432 bytes (opt-level = "z", fat LTO, one codegen unit, panic = "abort",
stripped; "s" is 13 KB larger and not measurably faster here, 2/3 exceed 1 MB). The memory
page fits in less than before: no float formatting code at all (a non-constant f32::clamp
pulled in ~30 KB of it for its panic message), short lists sorted by one small insertion sort
instead of std's ~4 KB sort per element type, ASCII lower-casing instead of Unicode tables, and
the picture download runs curl through posix_spawnp instead of std::process::Command
(~33 KB less).
The Processes page adds about 68 KB the same way, plus: one non-generic heap sort, string
tables kept out of the binary's relocations (every &str in a constant table costs 40 bytes in a
position-independent binary; a match costs none), and no core::fmt for numbers.
Memory & Storage data is read the same way, with every reading's cost in mind (cold cache,
this machine): /proc/meminfo and each disk's sysfs stat (the /proc/diskstats counters for
that disk alone: 0.9 µs instead of 8 µs for the whole table) every sample, every third while
the page is hidden so the histories keep going; /proc/vmstat (swap in/out, 10 µs) and PSI at
most every 4 s in eco (2.5 times a second in smooth); statvfs every 10 s (3 s); the mount table
only when poll() on /proc/self/mountinfo reports a change. A full process scan costs ~1.3 µs
a process (names are read once per pid, kernel threads remembered and skipped), so it runs every
4 s (eco: 2 minutes); in between the 32 biggest processes are followed live through their open
statm (one pread, ~1 µs each) 2.5 times a second (eco: every 10 s), and eco re-scans early
when RAM in use changes by more than those processes explain or, every 30 s, when a new pid of
64 MB or more appears (at most one early scan a minute: on a busy machine there always is one).
DIMM (spd5118, SMBus) and NVMe temperatures cost 40–65 µs of CPU and 1–20 ms of wall time
per read, so a helper thread reads them every 60 s in eco (5 s otherwise) and only while they're
shown: the main loop never waits for a sensor, and smooth frames stay on time.
Network & System data costs what the machine makes it cost, so it is read as rarely as
it can be. /proc/net/dev (40–55 µs here: the r8169 driver fetches the NIC's hardware
counters on every read, and sysfs statistics/* cost the same per file) once per sample while
the page is shown, every 10 s while it is hidden (the history keeps going), 5 times a second
in smooth. Connection counts come from /proc/net/snmp and /proc/net/sockstat (constant
cost, every 4 s in eco); listening sockets from a sock_diag dump limited to listening sockets
(7 µs; every 15 s in eco, 5 s otherwise). Anything that lists all connections walks the
kernel's whole connection hash table — 3.8 ms here through sock_diag, 0.3 ms through
/proc/net/tcp — so the busiest remote ends use /proc/net/tcp, only for an address family
that has non-listening sockets, every 60 s in eco (15 s otherwise). Containers' CPU and network
every 10 s in eco (once a second otherwise), their memory every other time; services every 30 s
(2 s); the cgroup walk for containers and services every 20 s (10 s), reading only the branches
that can hold them; the Docker / Podman API every 60 s (30 s) or when a new container appears;
links and addresses every 60 s (30 s) or when the interface list changes. In eco at most one of
these runs per sample (the most overdue), so no wakeup costs much; finding which program owns
a port looks through /proc/*/fd a few dozen processes per sample, and only when a port of
yours appears that isn't known yet. While the page is shown no CPU numbers are visible, so the
CPU sampler runs every other sample there (twice a second in smooth). Eco on this page updates
every ~3–5 s (the NIC read and the cold caches of a busy machine are most of a sample).
| network page, 60 s runs (load ~2 from other work) | CPU per second | output | RSS |
|---|---|---|---|
| eco 128×45 · 415×105 | 74.8 · 62.4 µs | 0.3 · 0.2 KB/s | 4.1 · 4.9 MB |
| smooth 128×45 · 172×40 | 3.1 · 3.2 ms | 12.5 · 12.4 KB/s | 4.1 · 4.2 MB |
| (same session) CPU view eco 128×45 · 415×105; without the network page | 75.5 · 74.3 µs; 76.3 µs | 4.0 · 5.0 MB |
Smooth frames on the network page stay on the 60 fps grid (consecutive frame intervals p95 /
median 1.04, none off the grid; the Memory & Storage page measured 1.05 in the same session).
RSS: IPv6 addresses are written by cpuview, not libc's inet_ntop, which would map another
128 KB of libc for a few link-local addresses.
Download / upload rates match /proc/net/dev deltas over the same second within 0.5 % (a
2.5 MB/s ping flood), container memory matches docker stats, listening ports and their
owners match ss -ltnup (run as root). The page adds 69.5 KB to the binary (1,117,088 bytes),
written to be small: no format machinery on its paths (string concatenation into the stack
formatter), loops instead of iterator chains and closures (each extra function costs its unwind
tables too), one generic insertion sort, a shell sort for the connection table; and to make room,
the palette's median cut sorts by one channel with a counting sort (−4 KB) and the stack
formatter's constructor isn't inlined at its hundreds of call sites (−4 KB).
Sensors & Power data costs what the hardware makes it cost, which differs by three orders of magnitude (cold cache, this machine): a k10temp temperature 3–6 µs, a cached hwmon attribute 1–2 µs, a DIMM sensor (SMBus) ~95 µs, the amdgpu power reading (a message to the GPU's firmware) 50–400 µs, and the motherboard's Nuvoton chip 2.5–3 ms: its driver re-reads all ~300 registers over the LPC bus whenever its 1.5 s cache is stale, so the first attribute of a read pays for all of them. Each source is therefore read on its own cadence, stretched by its measured cost to a share of the budget (eco: CPU temperatures every 3 s, the board chip — fans, board temperatures, voltages — every ~70–100 s, RAM / SSD / network chips every 60 s or more, at most one dear read every 30 s; smooth: the board chip every ~4 s, CPU power twice a second), and the page says how fresh the fans are. In eco the reads have their own share of the token bucket and the rest of the page keeps under ~25 µs/s, so even a minute that holds a 2.7 ms board-chip read stays under 85 µs/s; the price is that eco updates this page every ~5 s at 128×45 (~15–30 s at 415×105). Nothing is read while the page is hidden; the histories mark that time as a gap.
| sensors page, 60 s runs (machine idle) | CPU per second | output | RSS |
|---|---|---|---|
| eco 128×45 · 415×105, a minute without a board-chip read | 27.8 · 27.7 µs | 0.1 · 0.0 KB/s | 4.2 · 4.9 MB |
| eco 128×45 · 415×105, the worst 60 s window of a 5-minute run (with a 2.9–3.8 ms board-chip read in it) · the 5-minute average | 74.8 · 67.0 µs · 50.6 · 26.3 µs | ||
| smooth 128×45 · 172×40 | 4.1 · 4.1 ms | 2.8 · 3.1 KB/s | 4.3 · 4.2 MB |
| (same session) the other pages, eco 128×45: CPU · memory · network · processes | 66.9 · 67.1 · 62.6 · 47.2 µs | 4.1–4.2 MB |
Smooth frames stay on the 60 fps grid (offset from the grid p95 1.3 ms); frames are written
only when something changed, which on this page is a few times a second. Values match
sensors (lm-sensors) and sysfs; with root, CPU package watts matched
perf stat -e power/energy-pkg/ (60.3 W over 2 s vs 58.5 W shown) and the cores' total its
power_core/energy-core/ (22.4 vs 20.8 W). The page adds about 94 KB to the binary
(1,210,160 bytes): name tables as single strings (no relocated &str tables), paths and small
files on the stack instead of Strings, rows written straight into one reused buffer, and
--setup-sensors as a shell script it shows before running.
What makes that possible:
- The process sleeps in
ppoll()and wakes only to sample, at the minute boundary (title clock) or on input. One wakeup =pread()s on file descriptors opened once + onewrite(). - On a core that has been idle, everything is cache-cold: a bare wakeup costs ~19 µs, reading
/proc/stat~45 µs (the kernel sums every IRQ counter of every CPU) and eachscaling_cur_freq~1.4 µs. So a full sample once per second would already cost ~110 µs/s. The sample rate is therefore paced by a CPU-time budget: a token bucket refills at 65 µs per second (capped at 1.2 ms) and every wakeup pays all the CPU time the process used since the last one (CLOCK_PROCESS_CPUTIME_ID: every thread, the minute clock, scans and refreshes included; debt is carried, never forgiven). Samples come every second while loads change and every 2 s when they are stable, but only once the bucket holds what a sample is expected to cost (a decaying peak of the recent ones, so the dearer samples with a process scan or a filesystem refresh are paid for in advance); a page whose samples cost more than 1.2 ms gets a slower refill instead. So the average stays at or below 65 µs/s and any 60 s window below ~85 µs/s on any machine, page and terminal size: a bigger screen or a busier machine means fewer updates, never more CPU. In the runs above that was one update every ~2 s on average at 128×45 (every 5–12 s at 415×105), with 1 s bursts when something changes. Key presses are answered immediately; their CPU time is charged too, but may only use up saved tokens. - The process is pinned to the physical core the scheduler uses least (lowest amd-pstate
preferred-core rank, else the last core) among the CPUs it may use — a single-core
tasksetis left alone (CPUVIEW_PIN=offdisables): that core's private L2 usually still holds cpuview's code and data at the next wakeup, ~15 % cheaper per sample. - Clocks are read only for CPUs that did work in the load window (idle CPUs report their minimum clock anyway); barely busy CPUs are read round-robin; SMT siblings that are both busy share one read (one clock domain). One temperature sensor every 3 s (k10temp reads are ~10 µs), load average every 5 s, governor every 10 s.
- Rendering is retained: cells are compared as they are written, so only changed cells are
composited and sent; bars update only the cells between the old and new length; graphs,
strips and the heatmap scroll every 2 s at eco and fixed speeds (one braille cell; every 4–6 s on very large windows,
where most frames then only touch bars and numbers); integers and decimals are formatted without
core::fmt(no float formatting or parsing code in the binary); big buffers live in their own mappings and go back to the kernel when freed. Smooth's animation frames redraw only what moved (memo keys per panel and per card row) and never send picture data.
On Windows (i9-13900K, Windows 11 on the Balanced plan, a busy desktop: ~620 processes and 15 000 threads; 128×45 in a pseudo console that is read continuously; 60 s windows, eco after a minute's warm-up). CPU time is the process's exact cycle count (QueryProcessCycleTime); GetProcessTimes is in brackets: it moves in 15.6 ms ticks, so eco's ~3–5 ms a minute reads 0 (one tick in a minute would be 260 µs/s), and a smooth minute reads anywhere from 0.7× to 2× the cycle count:
| page | eco (2 windows) | smooth | smooth output |
|---|---|---|---|
| overview | 21–57 µs/s (0) | 4.2 ms/s (5.7) | 11 KB/s |
| CPU | 57–68 µs/s (0) | 4.5 ms/s (6.8) | 70 KB/s |
| memory & storage | 34–83 µs/s (0) | 4.3 ms/s (7.0) | 3.3 KB/s |
| network | 4–59 µs/s (0) | 3.8 ms/s (4.9) | 5 KB/s |
| processes | 9–48 µs/s (0) | 3.8–5.1 ms/s, 3 windows (2.3–4.7) | 19–32 KB/s |
| sensors | 50–63 µs/s (0) | 4.0 ms/s (8.3) | 6 KB/s |
(With cpuview's sensor service installed and every board sensor shown; a busier desktop than earlier runs: ~645 processes, 22 % of the CPU busy with other work.) The sensor service itself: ~8 MB of working set (1.4 MB private), no CPU while nothing asks (it waits on an event), and while a cpuview asks every second 0.34 ms/s (GetProcessTimes over 26 minutes), most of it Intel's per-core temperatures (the service's thread visits every core), which it now reads every 5 s.
The same work costs more CPU time when Windows has the core clocked down: in one hour with the clocks low, smooth measured up to 7–8 ms/s on the overview and processes pages (the frame-rate governor had halved the frame rate twice).
The budget is the same as on Linux, but a sample costs more there (the console, the clocks' performance counters, process and socket tables that walk the whole system), so eco updates every ~5 s on the CPU page and every ~15–60 s on the others; the processes page, whose sample is the dearest, now and then waits a minute or two. The eco budget counts the main thread's exact cycles (QueryThreadCycleTime: 0.1 µs to read) and adds the other threads' once a minute where the budget is charged (QueryProcessCycleTime costs 50–150 µs). The full process list walks every thread of every process — 16 ms with 15 000 threads — so it is read when a page that needs it is entered (and outside eco now and then); in between the basic list (pids and names, ~0.1–0.4 ms) and process handles kept open keep it current. The working set is 8–11 MB (the performance counter library is ~5 MB of it).
- Clock speeds come from cpufreq (
scaling_cur_freq), like the Python version. - Ryzen reports temperature per CCD (
Tctl,Tccd1,Tccd2), shown above each CCD column. - Avoids glyphs Cascadia Mono lacks (the best preferred core is marked
◆). - Screenshots in
docs/screenshots/theme-*.webp,image-*.webp,compact-80x24.webpandterminal-background-wt.webpare the design mockups made before the Rust version (demo data, Python reference compositor).docs/screenshots/rust-*.webpare captures of this version. Sixel pictures in those captures are decoded by the capture harness, not by a real terminal. Addresses, container names, paths and user names in them are replaced with placeholders (10.0.0.x, 203.0.113.x, "app", "user").
cargo test --release # parsing (/proc/stat, meminfo, vmstat, diskstats, mountinfo), layout fit at many sizes, probe matrix, sixel round trip, input parser …
cargo clippy --release
cargo build --release --features prof && CPUVIEW_PROFILE=/tmp/prof.txt target/release/cpuview # per-phase CPU time, written on exit
python3 themes/reference.py render nebula out.png # the theme spec's reference rendererPackages: packaging/build-deb.sh [amd64|arm64] builds a static (musl) .deb and
packaging/build-tarball.sh [x86_64|aarch64] a tarball into dist/;
packaging/make-apt-repo.sh KEY_ID turns dist/*.deb into a signed APT repository
(dist/apt), and packaging/make-pacman-repo.sh KEY_ID (on Arch, with packaging/arch/PKGBUILD)
adds a signed pacman repository (dist/apt/arch/x86_64). .github/workflows/apt.yml does all
of it on every v* tag, attaches the packages to the release and publishes both repositories
on GitHub Pages (secrets APT_GPG_KEY, APT_GPG_KEY_ID).




















