macmon is a sudoless performance monitor for Apple Silicon Macs. It reads real-time CPU / GPU / ANE power usage, temperatures, and memory stats through a private macOS API — the same data powermetrics exposes — without requiring root access.
🌟 Features
- 🚫 Runs without sudo
- ⚡ Real-time CPU / GPU / ANE power usage
- 📊 CPU frequency-scaled and active ratios per cluster
- 💾 RAM / Swap usage
- 📈 Historical charts with average and max values
- 🌡️ Average CPU / GPU temperature
- 🎨 Switchable color themes (6 variants)
- 🪟 Can be displayed in a small window
- 🦀 Written in Rust
📥 Installation
brew install macmon
Install using MacPorts:
sudo port install macmon
Install using Cargo:
cargo install macmon
Install using Nix:
nix-env -i macmon
🚀 Usage
Usage: macmon [OPTIONS] [COMMAND] Commands: pipe Output metrics in JSON format serve Serve metrics over HTTP debug Print debug information stress Generate load for testing metrics help Print this message or the help of the given subcommand(s) Options: -i, --interval <INTERVAL> Update interval in milliseconds [default: 1000] -h, --help Print help -V, --version Print version
Interactive mode
Run macmon without a subcommand to open the terminal UI.
Controls:
c - change color
v - switch charts view: gauge / sparkline
d - toggle detailed CPU/RAM view
r - switch ratio mode: scaled / active
q - quit
JSON output
You can use the pipe subcommand to output metrics in JSON format, which makes it suitable for piping into other tools or scripts. For example:
macmon pipe | jqThis command runs macmon in "pipe" mode and sends the output to jq for pretty-printing.
You can also specify the number of samples to collect using the -s or --samples parameter (default: 0, which runs indefinitely), and set the update interval in milliseconds using the -i or --interval parameter (default: 1000 ms). For example:
macmon pipe -s 10 -i 500 | jqThis will collect 10 samples with an update interval of 500 milliseconds.
HTTP server
You can use the serve subcommand to expose metrics over HTTP. This is useful for integrating with monitoring systems like Prometheus and Grafana.
macmon serve # default port 9090, interval 1000ms macmon serve --host 127.0.0.1 # listen on localhost only macmon serve -p 8080 # custom port macmon serve -i 500 # sampling interval 500ms macmon serve & # run in background
Two endpoints are available:
| Endpoint | Format | Description |
|---|---|---|
GET /json |
JSON | Current metrics snapshot (same format as pipe --soc-info) |
GET /metrics |
Prometheus | Metrics in Prometheus text format |
launchd service
To start macmon serve automatically on login and keep it running:
macmon serve --install # install and start (default port 9090) macmon serve --port 8080 --install # with custom port macmon serve --host 127.0.0.1 --install # listen on localhost only macmon serve --uninstall # stop and remove
This creates a launchd agent at ~/Library/LaunchAgents/com.macmon.plist that auto-starts on login and restarts on crash.
Prometheus and Grafana
The /metrics endpoint exposes metrics in Prometheus format. See examples/grafana for a local demo stack with Prometheus and Grafana.
# HELP macmon_cpu_temp_celsius Average CPU temperature in Celsius
# TYPE macmon_cpu_temp_celsius gauge
macmon_cpu_temp_celsius{chip="Apple M3 Pro"} 47.3
# HELP macmon_cpu_power_watts CPU power consumption in Watts
# TYPE macmon_cpu_power_watts gauge
macmon_cpu_power_watts{chip="Apple M3 Pro"} 8.42
# HELP macmon_fan_speed_rpm Fan speed in revolutions per minute
# TYPE macmon_fan_speed_rpm gauge
macmon_fan_speed_rpm{chip="Apple M3 Pro",fan="fan0"} 1234
# HELP macmon_cpu_scaled_ratio Combined frequency-scaled CPU ratio (0–1), weighted by core count
# TYPE macmon_cpu_scaled_ratio gauge
macmon_cpu_scaled_ratio{chip="Apple M3 Pro"} 0.037
# HELP macmon_cpu_active_ratio Combined CPU active residency ratio (not frequency-scaled, 0–1), weighted by core count
# TYPE macmon_cpu_active_ratio gauge
macmon_cpu_active_ratio{chip="Apple M3 Pro"} 0.092
# HELP macmon_ecpu_scaled_ratio Efficiency CPU cluster frequency-scaled ratio (0–1)
# TYPE macmon_ecpu_scaled_ratio gauge
macmon_ecpu_scaled_ratio{chip="Apple M3 Pro"} 0.083
# HELP macmon_ecpu_freq_mhz Efficiency CPU cluster frequency in MHz
# TYPE macmon_ecpu_freq_mhz gauge
macmon_ecpu_freq_mhz{chip="Apple M3 Pro"} 1100
# HELP macmon_ecpu_active_ratio Efficiency CPU cluster active residency ratio (not frequency-scaled, 0–1)
# TYPE macmon_ecpu_active_ratio gauge
macmon_ecpu_active_ratio{chip="Apple M3 Pro"} 0.18
Stress testing
Use macmon stress to generate load while checking metric behavior:
macmon stress macmon stress pulse --duration 30 macmon stress cpu --duration 30 macmon stress cpu --workers 8 --duration 30 macmon stress gpu --duration 30 macmon stress all --duration 30
The default pulse mode generates a predictable cyclic CPU load with a fixed 50% duty cycle on half of the logical CPUs. The cpu and gpu modes continuously load only the selected processor, while all loads both. The cpu and all modes use all logical CPUs unless --workers is specified; --workers has no effect in gpu mode.
📊 Metrics
Output format
The pipe command and the HTTP /json endpoint return the same metrics:
Active and scaled ratios
active_ratio is the share of the sampling interval during which the processor was doing any work. scaled_ratio is the same measure adjusted for operating frequency, showing the share of the processor's maximum possible capacity that was used.
For interval
