Skip to content

Commit 561de4d

Browse files
committed
v0.6.1
1 parent 26ad1b7 commit 561de4d

File tree

4 files changed

+78
-68
lines changed

4 files changed

+78
-68
lines changed

β€ŽCargo.lockβ€Ž

Lines changed: 20 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€ŽCargo.tomlβ€Ž

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
[package]
22
name = "macmon"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
edition = "2024"
5+
description = "Sudoless performance monitoring CLI tool for Apple Silicon processors"
6+
authors = ["vladkens"]
7+
license = "MIT"
8+
repository = "https://github.com/vladkens/macmon"
9+
readme = "readme.md"
10+
keywords = ["macos", "monitoring", "performance", "cli"]
11+
categories = ["command-line-utilities", "hardware-support"]
512

613
[lints.rust]
714
non_camel_case_types = "allow"
@@ -19,12 +26,12 @@ strip = false
1926
lto = false
2027

2128
[dependencies]
22-
chrono = "0.4.39"
23-
clap = { version = "4.5.31", features = ["derive"] }
24-
core-foundation = "0.10.0"
25-
libc = "0.2.170"
29+
chrono = "0.4.41"
30+
clap = { version = "4.5.39", features = ["derive"] }
31+
core-foundation = "0.10.1"
32+
libc = "0.2.172"
2633
num-traits = "0.2.19"
2734
ratatui = { version = "0.29.0", features = ["serde"] }
28-
serde = { version = "1.0.218", features = ["derive"] }
35+
serde = { version = "1.0.219", features = ["derive"] }
2936
serde-inline-default = "0.2.3"
30-
serde_json = "1.0.139"
37+
serde_json = "1.0.140"

β€Žreadme.mdβ€Ž

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div align="center">
44

5-
Sudoless performance monitoring CLI tool for Apple Silicon processors.
5+
A sudoless performance monitoring CLI tool for Apple Silicon processors.
66

77
[<img src="https://badges.ws/github/assets-dl/vladkens/macmon" />](https://github.com/vladkens/macmon/releases)
88
[<img src="https://badges.ws/github/release/vladkens/macmon" />](https://github.com/vladkens/macmon/releases)
@@ -17,56 +17,38 @@ Sudoless performance monitoring CLI tool for Apple Silicon processors.
1717

1818
## Motivation
1919

20-
Apple Silicon processors don't provide an easy way to see live power consumption. I was interested in this information while testing local LLM models. `asitop` is a nice and simple TUI to quickly see current metrics, but it reads data from `powermetrics` and requires root privileges. `macmon` uses a private macOS API to gather metrics (essentially the same as `powermetrics`) but runs without sudo. πŸŽ‰
20+
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. πŸŽ‰
2121

2222
## 🌟 Features
2323

24-
- 🚫 Works without sudo
24+
- 🚫 Runs without sudo
2525
- ⚑ Real-time CPU / GPU / ANE power usage
2626
- πŸ“Š CPU utilization per cluster
2727
- πŸ’Ύ RAM / Swap usage
28-
- πŸ“ˆ Historical charts + avg / max values
28+
- πŸ“ˆ Historical charts with average and max values
2929
- 🌑️ Average CPU / GPU temperature
30-
- 🎨 Switchable colors (6 variants)
31-
- πŸͺŸ Can be rendered in a small window
30+
- 🎨 Switchable color themes (6 variants)
31+
- πŸͺŸ Can be displayed in a small window
3232
- πŸ¦€ Written in Rust
3333

34-
## 🍺 Install via Homebrew
34+
## πŸ“₯ Installation
3535

36-
You can install [`macmon`](https://formulae.brew.sh/formula/macmon) using [brew](https://brew.sh/):
36+
- Install [`macmon`](https://formulae.brew.sh/formula/macmon) using [brew](https://brew.sh/):
3737

3838
```sh
39-
$ brew install macmon
39+
brew install macmon
4040
```
4141

42-
## πŸ–₯️ Install via MacPorts
43-
44-
You can also install [`macmon`](https://ports.macports.org/port/macmon/) using [MacPorts](https://macports.org/):
42+
- Install [`macmon`](https://ports.macports.org/port/macmon/) using [MacPorts](https://macports.org/):
4543

4644
```sh
47-
$ sudo port install macmon
45+
sudo port install macmon
4846
```
4947

50-
## πŸ“¦ Install from source
51-
52-
1. Install [Rust toolchain](https://www.rust-lang.org/tools/install)
53-
54-
2. Clone the repo:
48+
- Install [`macmon`](https://crates.io/crates/macmon) using [Cargo](https://crates.io/):
5549

5650
```sh
57-
git clone https://github.com/vladkens/macmon.git && cd macmon
58-
```
59-
60-
3. Build and run:
61-
62-
```sh
63-
cargo run -r
64-
```
65-
66-
4. (Optionally) Binary can be moved to bin folder:
67-
68-
```sh
69-
sudo cp target/release/macmon /usr/local/bin
51+
cargo install macmon
7052
```
7153

7254
## πŸš€ Usage
@@ -92,15 +74,15 @@ Controls:
9274

9375
## 🚰 Piping
9476

95-
You can use the pipe subcommand to output metrics in JSON format, which is suitable for piping into other tools or scripts. For example:
77+
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:
9678

9779
```sh
9880
macmon pipe | jq
9981
```
10082

101-
This command runs `macmon` in "pipe" mode and navigate output to `jq` for pretty-printing.
83+
This command runs `macmon` in "pipe" mode and sends the output to `jq` for pretty-printing.
10284

103-
You can also specify the number of samples to run using `-s` or `--samples` parameter (default: `0`, which runs indefinitely), and set update interval in milliseconds using the `-i` or `--interval` parameter (default: `1000` ms). For example:
85+
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:
10486

10587
```sh
10688
macmon pipe -s 10 -i 500 | jq
@@ -136,19 +118,38 @@ This will collect 10 samples with an update interval of 500 milliseconds.
136118
}
137119
```
138120

121+
## πŸ“¦ Build from Source
122+
123+
1. Install [Rust toolchain](https://www.rust-lang.org/tools/install)
124+
125+
2. Clone the repo:
126+
127+
```sh
128+
git clone https://github.com/vladkens/macmon.git && cd macmon
129+
```
130+
131+
3. Build and run:
132+
133+
```sh
134+
cargo run -r
135+
```
136+
139137
## 🀝 Contributing
140-
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 in helping us improve `macmon` πŸ’ͺ
138+
139+
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`. πŸ’ͺ
141140

142141
## πŸ“ License
143-
`macmon` is distributed under the MIT License. For more details, check out the LICENSE.
142+
143+
`macmon` is distributed under the MIT License. For more details, check out the LICENSE file.
144144

145145
## πŸ” See also
146-
- [tlkh/asitop](https://github.com/tlkh/asitop) – Original tool. Python, requires sudo.
147-
- [dehydratedpotato/socpowerbud](https://github.com/dehydratedpotato/socpowerbud) – ObjectiveC, sudoless, no TUI.
148-
- [op06072/NeoAsitop](https://github.com/op06072/NeoAsitop) – Swift, sudoless.
149-
- [graelo/pumas](https://github.com/graelo/pumas) – Rust, requires sudo.
150-
- [context-labs/mactop](https://github.com/context-labs/mactop) – Go, requires sudo.
146+
147+
- [tlkh/asitop](https://github.com/tlkh/asitop) – The original tool. Written in Python, requires sudo.
148+
- [dehydratedpotato/socpowerbud](https://github.com/dehydratedpotato/socpowerbud) – Written in Objective-C, sudoless, no TUI.
149+
- [op06072/NeoAsitop](https://github.com/op06072/NeoAsitop) – Written in Swift, sudoless.
150+
- [graelo/pumas](https://github.com/graelo/pumas) – Written in Rust, requires sudo.
151+
- [context-labs/mactop](https://github.com/context-labs/mactop) – Written in Go, requires sudo.
151152

152153
---
153154

154-
*PS: One More Thing... Remember, monitoring your Mac's performance with `macmon` is like having a personal trainer for your processor β€” keeping those cores in shape! πŸ’ͺ*
155+
*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! πŸ’ͺ*

β€Žsrc/main.rsβ€Ž

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ fn main() -> Result<(), Box<dyn Error>> {
4848
let mut sampler = Sampler::new()?;
4949
let mut counter = 0u32;
5050

51-
let soc_info_val = if *soc_info {
52-
Some(sampler.get_soc_info().clone())
53-
} else {
54-
None
55-
};
51+
let soc_info_val = if *soc_info { Some(sampler.get_soc_info().clone()) } else { None };
5652

5753
loop {
5854
let doc = sampler.get_metrics(args.interval.max(100))?;

0 commit comments

Comments
Β (0)