op06072 / NeoAsitop

Sudoless Asitop
MIT License
29 stars 0 forks source link

neoasitop

A sudoless performance monitoring CLI tool for Apple Silicon

Stars

Introducing

What is neoasitop

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

neoasitop uses the custom 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 officially tested on following Apple Silicon Macs!

Why

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

socpowerbuddy-inspired custom logic is used to measure the following:

stats-inspired custom logic is used to measure the following:

sysctl is used to measure the following:

Hot is used to measure the following:

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

Feature

Installation, Usage, and Making

Note: Tool usage is listed by neoasitop --help

# advanced options
USAGE: neoasitop [--version] [--verbose] [--test] [--interval <interval>] [--color <color>] [--avg <avg>] [--dump <dump>]

OPTIONS:
  -v, --version           Print version information
  --verbose               Show detail information of this system like OS codename, CPU architecture name, etc.
  -t, --test              Test the features with dumped file from iorepdump.
  -i, --interval <interval>
                          Display interval and sampling interval for info gathering (seconds) [0.01~] (default: 1.0)
  -c, --color <color>     Choose display color (0~7) (default: 2)
  --avg <avg>             Interval for averaged values (seconds) (default: 30.0)
  -d, --dump <dump>       Path of the dumped file.
  -h, --help              Show help information.

color

Color Code Color note
0 black Light mode
1 red
2 green Default
3 yellow
4 blue
5 magenta
6 cyan
7 white

Install using Homebrew

  1. If you dont have Hombrew, install it!
  2. Add my tap using brew tap op06072/neoasitop
  3. Install the tool with brew install neoasitop
  4. Run neoasitop!

Install Manually

  1. Download the bin from latest release.
  2. Unzip the downloaded file into your desired dir (such as /usr/bin)
  3. Run neoasitop!

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:

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.