Skip to main content

nvidia-smi equivalent for macOS Apple Silicon – Monitor Metal GPU usage, power, and temperature

Project description

🍎 apple-smi

nvidia-smi equivalent for Apple Silicon – High-performance, sudoless GPU monitoring with zero dependencies.

$ apple-smi
Wed Mar 04 14:52:00 2026
+-----------------------------------------------------------------------------------------+
| APPLE-SMI 0.1.1              macOS Version: 26.3 (25D125)              Metal Version: 3 |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                               |                 Disp.A |                      |
|      Temp                 Pwr:Usage/Cap |           Memory-Usage |             GPU-Util |
|=========================================+========================+======================|
|   0  Apple M1 (8-Core GPU)              |                     On |                      |
|       30C                    2.4W / 20W |    13826MiB / 16384MiB |                  12% |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
| GPU           PID  Type   Process name                                       GPU Memory |
|                                                                                   Usage |
|=========================================================================================|
|   0         72743    C    python3.11                                             530MiB |
|   0          1007    G    NotificationCenter                                     170MiB |
|   0          3197    G    WeType                                                 216MiB |
+-----------------------------------------------------------------------------------------+

✨ Features

  • 🚫 No sudo required – Uses private macOS APIs (IOReport, IOHIDSensors, SMC) for sudoless operation.
  • Ultra-Fast & Lightweight – Optimized startup (<50ms) using targeted sysctl and ioreg calls.
  • 🔋 Power Monitoring – Displays SoC power consumption (Usage) against chip TDP (Cap).
  • 🌡️ Smart Thermals – High-accuracy GPU/SOC temperature readings with sensor fallback logic.
  • 📋 Robust Process Listing – Lists active GPU processes with full name resolution (no truncation for paths with spaces).
  • 🔍 C/G Classification – Categorizes processes by Type (C for Compute, G for Graphics).
  • 💾 Memory Usage – Detailed breakdown of unified memory utilization.
  • 🔄 Watch Compatible – Default 100ms sampling interval for smooth real-time monitoring.
  • 📦 Zero Dependencies – Pure Python, utilizing ctypes to interface with macOS frameworks.

📥 Installation

pip install apple-smi

🚀 Usage

Command Line Options

# Basic usage
apple-smi

# Set sampling interval (default: 100ms)
apple-smi --interval 250

# JSON output for integration with other tools
apple-smi --json

# Continuous monitoring (highly recommended)
watch -n 0.1 apple-smi

Process Filtering

By default, apple-smi only shows Compute (C) processes (e.g., Python, MLX, Torch, llama.cpp) to reduce system noise. You can show all GPU-connected processes (including window compositors and browsers) using an environment variable:

APPLE_SMI_SHOW_ALL_PROCESSES=1 apple-smi

Backends

apple-smi automatically selects the best available backend:

  1. IOKit (Default): Uses undocumented IOKit APIs for sudoless monitoring.
  2. Powermetrics (Fallback): Uses the system powermetrics tool (requires sudo or root privileges).
Variable Values Description
APPLE_SMI_BACKEND iokit, powermetrics Force a specific backend. Default: auto-detect.
APPLE_SMI_SHOW_ALL_PROCESSES 0, 1 Show all GPU processes (G+C). Default: 0.

🔧 Requirements

  • macOS on Apple Silicon (M1, M2, M3, M4, M5)
  • Python 3.10+

📝 License

MIT License – see LICENSE for details.

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

apple_smi-0.1.1.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

apple_smi-0.1.1-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file apple_smi-0.1.1.tar.gz.

File metadata

  • Download URL: apple_smi-0.1.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for apple_smi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 48e21e224eca1328fc264dbb2ad95cc66eb3f4fdf54338a03674f41ef56772f2
MD5 447a2ceee007befc63329b38b7c32723
BLAKE2b-256 7b4db3fe3470c5be19f43e074d9540cbb625c9fbaca985f1cd6c66c625e7f5fa

See more details on using hashes here.

File details

Details for the file apple_smi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: apple_smi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for apple_smi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 675c821d1234269901db71495b8777d9667720f2f1163d055854bea642e3141a
MD5 dd8a27249fa9a799516d0477cf467c0f
BLAKE2b-256 be94f08dc2b093c8c5173da51243693cd824863fdb4e4992acd6ca1a27d8fa97

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