Skip to content

mpeniket/mxtop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mxtop

Real-time terminal dashboard for Apple Silicon telemetry, implemented in Rust.

Monitor CPU, GPU, ANE, thermal, memory, and battery metrics on your Mac.


PNG image

Features

  • Per-cluster CPU metrics — frequency, utilisation, and power for each E/P cluster with per-core activity bars
  • DVFM frequency heatmaps — visualise CPU and GPU frequency state residency
  • GPU and ANE monitoring — active frequency, utilisation, and power draw
  • Memory and swap — usage bar with pressure-level indicators via Mach kernel calls
  • Thermal pressure — real-time throttling status (nominal/moderate/heavy/critical)
  • Battery — charge percentage, charging state, and system power draw
  • Sparklines — rolling time-series charts for power, frequency, and memory
  • Configurable sample rate — choose the polling interval at startup (100ms–30s)
  • Pause/resume — freeze sampling with a keypress

Requirements

  • macOS 15.0 or later
  • Apple Silicon (M1, M2, M3, M4, ...)
  • Root privileges (sudo) — required by powermetrics
  • Rust 1.85+ (to build from source)

Installation

cargo build --release

The binary is placed at target/aarch64-apple-darwin/release/mxtop.

Usage

sudo ./target/aarch64-apple-darwin/release/mxtop

CLI options

Flag Short Default Description
--interval <MS> -i 250 Sample interval in milliseconds (100–30000)
--history <N> 60 Sparkline history depth (number of samples, 1–4096)
--verbose -v Debug logging to a secure temporary file

Keyboard shortcuts

Key Action
q / Esc / Ctrl+C Quit
Space Toggle pause

How it works

mxtop spawns powermetrics as a subprocess, collecting CPU, GPU, ANE, thermal, and battery telemetry as streaming XML plist data. A reader thread parses samples delimited by NUL bytes and sends them to the main event loop. Memory stats are sampled directly via Mach kernel IPC (host_statistics64). The TUI is rendered with ratatui using the crossterm backend.

Architecture

See docs/architecture.md for a detailed Mermaid diagram of the data flow.

About

Real-time terminal dashboard for Apple Silicon Telemetry, implemented in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages