macmon β Mac Monitor
A sudoless performance monitoring CLI tool for Apple Silicon processors.
Motivation
Apple Silicon processors donβt provide an easy way to view live power consumption. I was interested in this data while testing local LLM models. asitop is a nice and simple TUI for quickly checking current metrics, but it reads data from powermetrics and requires root privileges. macmon uses a private macOS API to gather similar metrics (essentially the same as powermetrics), but runs without sudo. π
π Features
- π« Runs without sudo
- β‘ Real-time CPU / GPU / ANE power usage
- π CPU utilization per cluster
- πΎ RAM / Swap usage
- π Historical charts with average and max values
- π‘οΈ Average CPU / GPU temperature
- π¨ Switchable color themes (6 variants)
- πͺ Cβ¦
macmon β Mac Monitor
A sudoless performance monitoring CLI tool for Apple Silicon processors.
Motivation
Apple Silicon processors donβt provide an easy way to view live power consumption. I was interested in this data while testing local LLM models. asitop is a nice and simple TUI for quickly checking current metrics, but it reads data from powermetrics and requires root privileges. macmon uses a private macOS API to gather similar metrics (essentially the same as powermetrics), but runs without sudo. π
π Features
- π« Runs without sudo
- β‘ Real-time CPU / GPU / ANE power usage
- π CPU utilization 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
sudo port install macmon
cargo install macmon
nix-env -i macmon
π Usage
Usage: macmon [OPTIONS] [COMMAND]
Commands:
pipe Output metrics in JSON format
debug Print debug information
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
Controls:
c - change color
v - switch charts view: gauge / sparkline
q - quit
π° Piping
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 | jq
This 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 | jq
This will collect 10 samples with an update interval of 500 milliseconds.
Output
π¦ Build from Source
Install Rust toolchain 1.
Clone the repo:
git clone https://github.com/vladkens/macmon.git && cd macmon
- Build and run:
cargo run -r
π€ Contributing
We love contributions! Whether you have ideas, suggestions, or bug reports, feel free to open an issue or submit a pull request. Your input is essential to helping us improve macmon. πͺ
π License
macmon is distributed under the MIT License. For more details, check out the LICENSE file.
π See also
- tlkh/asitop β The original tool. Written in Python, requires sudo.
- dehydratedpotato/socpowerbud β Written in Objective-C, sudoless, no TUI.
- op06072/NeoAsitop β Written in Swift, sudoless.
- graelo/pumas β Written in Rust, requires sudo.
- context-labs/mactop β Written in Go, requires sudo.
P.S. One more thing... Monitoring your Macβs performance with macmon is like having a personal trainer for your processor β keeping those cores in shape! πͺ