Skip to content

Commit

Permalink
FIx the leak and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
op06072 committed Jan 19, 2023
1 parent 1df316f commit cc1485f
Show file tree
Hide file tree
Showing 6 changed files with 920 additions and 652 deletions.
105 changes: 61 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align="center" style="">neoasitop</h1>
<h1 align="center">neoasitop</h1>
<p align="center">
A sudoless performance monitoring CLI tool for Apple Silicon
</p>
Expand All @@ -10,57 +10,31 @@
<a href="https://github.com/op06072/NeoAsitop/blob/main/License">
<img src="https://img.shields.io/github/license/op06072/NeoAsitop.svg"/>
</a>
<a href="https://github.com/op06072/NeoAsitop/stargazers">
<img alt="Stars" src="https://img.shields.io/github/stars/op06072/NeoAsitop.svg"/>
</a>
</p>

![](image/neoasitop.png)

# Introducing
## What is `neoasitop`

A Swift-based `asitop`-inspired command line tool for Apple Silicon (aka M1) Macs.

* Utilization info:
* CPU (E-cluster and P-cluster), GPU
* Frequency and utilization, temperature
* ANE utilization (measured by power)
* Fan speed (if fan exists)
* SOC throttling
* Memory info:
* RAM and swap, size and usage
* Memory bandwidth (CPU/GPU/total)
* Media engine bandwidth usage
* Power info:
* System power, CPU power, GPU power, DRAM power
* Chart for CPU/GPU power
* Peak power, rolling average display
A Swift-based `asitop`-inspired command line tool for Apple Silicon (aka M series) Macs.

`neoasitop` uses the custom [`socpowerbuddy`](https://github.com/BitesPotatoBacks/SocPowerBuddy)-inspired logic, which allows access to a variety of hardware performance counters without sudo permission. `neoasitop` is lightweight and has minimal performance impact.

**`neoasitop` only tested on following Apple Silicon Macs!**
**`neoasitop` officially tested on following Apple Silicon Macs!**

* Test list
* 2021 MacBook Pro[MacBookPro18,1] (M1 Pro, Ventura)
* 2022 Mac Studio[Mac13,2] (M1 Ultra, Ventura)
* 2020 Mac mini[Macmini9,1] (M1, Monterey)
* 2020 MacBook Air[MacBookAir10,1] (M1, Monterey)

## Installation and Usage

1. Install the [Homebrew](https://brew.sh/index_ko)
2. Run `brew tap op06072/neoasitop`
3. Run `brew install neoasitop`
4. Run `neoasitop`
## Why

```shell
# advanced options
neoasitop [--interval <interval>] [--color <color>] [--avg <avg>]

OPTIONS:
-i, --interval <interval>
Display interval and sampling interval for info gathering (seconds) (default: 1)
-c, --color <color> Choose display color (0~8) (default: 2)
--avg <avg> Interval for averaged values (seconds) (default: 30)
-h, --help Show help information.
```
Because I didn't want to be the system admin just to see the status of the system. Why kill a fly with a spear? Admin privileges are too powerful to just monitor the system.

## How it works

Expand All @@ -86,31 +60,74 @@ OPTIONS:
* Fan existence
* memory and swap usage

Some information is guesstimate and hardcoded as there doesn't seem to be a official source for it on the system:
[`Hot`](https://github.com/macmade/Hot) is used to measure the following:

* SOC Throttling

Some information is guesstimated and hardcoded as there doesn't seem to be a official source for it on the system:

* CPU/GPU TDP
* CPU/GPU maximum memory bandwidth
* ANE max power
* Media engine max bandwidth

[`Hot`](https://github.com/macmade/Hot)
## Feature

* SOC Throttling
* Utilization info:
* CPU (E-cluster and P-cluster), GPU
* Frequency and utilization, temperature
* ANE utilization (measured by power)
* Fan speed (if fan exists)
* SOC throttling
* Memory info:
* RAM and swap, size and usage
* Memory bandwidth (CPU/GPU/total)
* Media engine bandwidth usage
* Power info:
* System power, CPU power, GPU power, DRAM power
* Chart for CPU/GPU power
* Peak power, rolling average display

## Why
# Installation, Usage, and Making
**Note:** Tool usage is listed by `neoasitop --help`
```shell
# advanced options
neoasitop [--interval <interval>] [--color <color>] [--avg <avg>]

Because I didn't find something like this online. Also, just curious about stuff.
OPTIONS:
-i, --interval <interval>
Display interval and sampling interval for info gathering (seconds) (default: 1)
-c, --color <color> Choose display color (0~8) (default: 2)
--avg <avg> Interval for averaged values (seconds) (default: 30)
-h, --help Show help information.
```

## Disclaimers
## Install using Homebrew
1. If you dont have Hombrew, [install it](https://brew.sh/index_ko)!
2. Add my tap using `brew tap op06072/neoasitop`
3. Install the tool with `brew install neoasitop`
4. Run `neoasitop`!

I just get this from `asitop` don't blame me if it fried your new MacBook or something.
## Install Manually
1. Download the bin from [latest release](https://github.com/op06072/NeoAsitop/releases).
2. Unzip the downloaded file into your desired dir (such as `/usr/bin`)
4. Run `neoasitop`!

## Credits
### Building the project
The source is bundled in a Xcode project. Simply build via Xcode on your mac!

### Diagnosing missing entries for your system
A diagnostic dumping tool is included within each release: `iorepdump`. It dumps all IOReport groups matching those used by NeoAsitop. It's helpful for discovering entries on new silicon.

# Credits

Special thanks to:

- [tlkh](https://github.com/tlkh) for the project [asitop](https://github.com/tlkh/asitop) that inspired me to start this project.
- [BitesPotatoBacks](https://github.com/BitesPotatoBacks) for the project [SocPowerBuddy](https://github.com/BitesPotatoBacks/SocPowerBuddy) that gave me the way to replace powermetrics.
- [exelban](https://github.com/exelban) for the project [stats](https://github.com/exelban/stats) that gave me the way to get sensor value.
- [macmade](https://github.com/macmade) for the project [Hot](https://github.com/macmade/Hot) that gave me the way to get soc throttle status.
- [rderik](https://github.com/rderik) for the project [clock](https://github.com/rderik/clock) that gave me the way to use ncurses in swift.
- [rderik](https://github.com/rderik) for the project [clock](https://github.com/rderik/clock) that gave me the way to use ncurses in swift.

## Dislaimers
As I said, some information is just guesstimated. So don't blame me if it fried your new MacBook or something. ~~Well...I don't think that's going to happen.~~
Loading

0 comments on commit cc1485f

Please sign in to comment.