Skip to main content

Performance monitoring CLI tool for Apple Silicon

Project description

mxtop is an actively maintained fork of the original asitop. It aims to fix long-standing bugs and ensure compatibility with the latest macOS updates and Apple Silicon chips.

mxtop

PyPI - Downloads

Performance monitoring CLI tool for Apple Silicon

pip install mxtop

What is mxtop

A Python-based nvtop-inspired command line tool for Apple Silicon (aka M1) Macs.

  • Utilization info:
    • CPU (E-cluster and P-cluster), GPU
    • Frequency and utilization
    • ANE utilization (measured by power)
  • Memory info:
    • RAM and swap, size and usage
    • (Apple removed memory bandwidth from powermetrics)
  • Power info:
    • CPU power, GPU power (Apple removed package power from powermetrics)
    • Chart for CPU/GPU power
    • Peak power, rolling average display

mxtop uses the built-in powermetrics utility on macOS, which allows access to a variety of hardware performance counters. Note that it requires sudo to run due to powermetrics needing root access to run. mxtop is lightweight and has minimal performance impact.

mxtop only works on Apple Silicon Macs on macOS Monterey!

Installation and Usage

mxtop is a Python-based command line tool. You need pip to download and install mxtop. macOS already comes with Python, to install pip, you can follow an online guide. After you install mxtop via pip, you can use it via the Terminal.

# to enter password before start
# this mode is recommended!
sudo mxtop

# it will prompt password on start
mxtop

# advanced options
mxtop [-h] [--interval INTERVAL] [--color COLOR] [--avg AVG]
optional arguments:
  -h, --help           show this help message and exit
  --interval INTERVAL  Display interval and sampling interval for powermetrics (seconds)
  --color COLOR        Choose display color (0~8)
  --avg AVG            Interval for averaged values (seconds)

How it works

powermetrics is used to measure the following:

  • CPU/GPU utilization via active residency
  • CPU/GPU frequency
  • Package/CPU/GPU/ANE energy consumption
  • CPU/GPU/Media Total memory bandwidth via the DCS (DRAM Command Scheduler)

psutil is used to measure the following:

  • memory and swap usage

sysctl is used to measure the following:

  • CPU name
  • CPU core counts

system_profiler is used to measure the following:

  • GPU core count

Some information is guesstimate 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

Why

Because I didn't find something like this online. Also, just curious about stuff.

Disclaimers

I did this randomly don't blame me if it fried your new MacBook or something.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mxtop-0.1.0.tar.gz (725.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mxtop-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file mxtop-0.1.0.tar.gz.

File metadata

  • Download URL: mxtop-0.1.0.tar.gz
  • Upload date:
  • Size: 725.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for mxtop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb668c971c1193a09f37946331a41ea0944fbd76cd994a289e6ee2073f5f6d74
MD5 65707a0bfda19f29b82043cc6c085189
BLAKE2b-256 f4060c9a5b312858f40c09c2e2865ee60919768e6b9e176b153219f81d24b44a

See more details on using hashes here.

File details

Details for the file mxtop-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mxtop-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for mxtop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eda1defaa113b3eb03f02c885e96c83bc42eeea038233432ff04952a6ff6e04
MD5 23587f16918883be4e373052eb56087a
BLAKE2b-256 532bb6b57b0022295280b68c8f03ccda477f4900b310d4875f481d733938a8a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page