Skip to main content

macOS silicon monitor (E/P cores, GPU, NPU) with a TUI

Project description

monmon

A terminal UI for watching Apple Silicon work: efficiency cores, performance cores, GPU, and the Neural Engine (NPU) — plus the top processes driving load.

monmon demo — live E/P cores, GPU, ANE, memory, sorting, filtering, and help

Live demo (sort · filter · help). Static version: screenshot.

One-shot build note: this entire project was generated in a single pass by Claude Opus 4.7 (1M context) running in Claude Code, from the prompt shown at the bottom of this README. No manual edits were made before the first successful run.

Requirements

  • macOS on Apple Silicon (M1 or newer)
  • sudo access — Apple's powermetrics requires root
  • Homebrew (for the recommended install path) or Python 3.12+ and uv (for the source path)

Install

Homebrew (recommended)

brew install gavi/monmon/monmon

Homebrew 6+ requires trusting third-party taps once before installing or upgrading from them: brew trust gavi/monmon

That's a shorthand for brew tap gavi/monmon && brew install monmon. It pulls the formula from gavi/homebrew-monmon, creates an isolated Python 3.12 virtualenv in $(brew --prefix)/opt/monmon/libexec, installs all dependencies pinned to exact versions, and puts monmon on your $PATH.

From source (for development)

git clone https://github.com/gavi/monmon.git
cd monmon
uv sync
uv run monmon

Checks (all run headless, no sudo needed — CI runs the same three):

uv run pytest        # parser fixtures + Textual UI tests
uv run ruff check .  # lint
uv run mypy          # typecheck

Parser tests run against recorded powermetrics samples in tests/fixtures/ — contributions of captures from other chips and macOS versions are welcome; see tests/fixtures/README.md.

Run

monmon                 # 1 s sample interval
monmon --interval 500  # 500 ms samples — snappier, more CPU overhead
monmon --help

The first time you launch, macOS prompts for your password so sudo can start powermetrics. The credential is cached for the session, so subsequent runs in the same shell skip the prompt.

If the in-TUI password prompt fails (common on TouchID-only setups where subprocess sudo can't trigger the biometric dialog), cache your credential in the shell first:

sudo -v && monmon

Keys:

key action
s sort process table by CPU / memory
/ filter processes by name (esc clears)
k kill the selected process (asks first)
p pause / resume sampling
? help
q quit

The layout stacks vertically on terminals narrower than 100 columns.

Optional: skip the password prompt

powermetrics is read-only telemetry, so it is reasonable to allow it — and only it — through sudo without a password:

echo "$(whoami) ALL=(root) NOPASSWD: /usr/bin/powermetrics" | sudo tee /etc/sudoers.d/powermetrics
sudo chmod 440 /etc/sudoers.d/powermetrics
sudo visudo -c

monmon detects the rule and starts without prompting. Undo it any time with sudo rm /etc/sudoers.d/powermetrics.

Upgrade / uninstall

brew update && brew upgrade monmon    # pull in new releases
brew uninstall monmon                  # remove
brew untap gavi/monmon                 # drop the tap too

What you see

  • CPU panel: every E-core and P-core cluster with per-core active-residency bars and current frequency, plus a rolling overall-load sparkline. E-clusters render in cyan, P-clusters in magenta.
  • GPU panel: active residency, frequency, power draw, and history.
  • NPU panel: Apple Neural Engine power. powermetrics doesn't expose an "active" counter for ANE, so monmon treats any non-trivial power draw as "in use" and scales the bar against an 8 W ceiling that self-calibrates upward if your chip draws more.
  • Memory panel: RAM used vs total, swap, and history.
  • Process table: top processes by CPU or memory from psutil — press s to toggle the sort key. (powermetrics' task sampler is unreliable across macOS versions, so we use psutil for the "what's running?" view.)
  • Summary bar: chip model, core counts, and package power with a sparkline scaled to the session's peak.

Data source

Everything above comes from a single powermetrics -f plist stream with the cpu_power, gpu_power, and ane_power samplers. Samples are NUL-delimited XML plists; see src/monmon/power.py for the parser.

Origin prompt

This is the exact prompt that produced the project, verbatim:

lets build a mac monitoring system that shows gpu
lets use
uv for package management and tui
we need to see e-cores and p-cores and also gpu and npu to see what is being run
go ahead a build it

Model: Claude Opus 4.7 (1M context) via Claude Code. One-shot — the only follow-up was a cosmetic request to add this section and a CLAUDE.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monmon-0.3.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monmon-0.3.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file monmon-0.3.0.tar.gz.

File metadata

  • Download URL: monmon-0.3.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for monmon-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8874b1dacee08b71443813fa07d0a01282b247f70f7b975604e429b3d6e0afc9
MD5 6886e167707289727bbf3f442d4f8f69
BLAKE2b-256 034ec3630d447c911d87a1dda8fa7c5bd2fbfa0832f559a84dd11ad97dd6f591

See more details on using hashes here.

File details

Details for the file monmon-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: monmon-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for monmon-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 863fab8aca04e45baf99df5025a542e99aca52a72f2f9fd0dd90fca3d66ccf54
MD5 970aee3d5513b196b768e0decf65a698
BLAKE2b-256 b2de0517aa2dcfbb406e88561036eebad89c2074bb6310434a0400e8a20f0058

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page