{"id":48830200,"url":"https://github.com/yeahdongcn/apple-smi","last_synced_at":"2026-04-14T20:02:20.495Z","repository":{"id":341957182,"uuid":"1172154028","full_name":"yeahdongcn/apple-smi","owner":"yeahdongcn","description":"The familiar nvidia-smi experience for Apple Silicon: High-performance, sudoless GPU monitoring with zero dependencies.","archived":false,"fork":false,"pushed_at":"2026-03-04T06:56:46.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T08:13:00.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yeahdongcn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-04T01:59:35.000Z","updated_at":"2026-03-04T06:56:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yeahdongcn/apple-smi","commit_stats":null,"previous_names":["yeahdongcn/apple-smi"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yeahdongcn/apple-smi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2Fapple-smi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2Fapple-smi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2Fapple-smi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2Fapple-smi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeahdongcn","download_url":"https://codeload.github.com/yeahdongcn/apple-smi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2Fapple-smi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31812977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-14T20:02:13.978Z","updated_at":"2026-04-14T20:02:20.487Z","avatar_url":"https://github.com/yeahdongcn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍎 apple-smi\n\n**nvidia-smi equivalent for Apple Silicon** – High-performance, sudoless GPU monitoring with zero dependencies.\n\n```text\n$ apple-smi\nWed Mar 04 14:52:00 2026\n+-----------------------------------------------------------------------------------------+\n| APPLE-SMI 0.1.4              macOS Version: 26.3 (25D125)              Metal Version: 3 |\n+-----------------------------------------+------------------------+----------------------+\n| GPU  Name                               |                 Disp.A |                      |\n|      Temp                 Pwr:Usage/Cap |           Memory-Usage |             GPU-Util |\n|=========================================+========================+======================|\n|   0  Apple M1 (8-Core GPU)              |                     On |                      |\n|       30C                    2.4W / 20W |    13826MiB / 16384MiB |                  12% |\n+-----------------------------------------+------------------------+----------------------+\n\n+-----------------------------------------------------------------------------------------+\n| Processes:                                                                              |\n| GPU           PID  Type   Process name                                       GPU Memory |\n|                                                                                   Usage |\n|=========================================================================================|\n|   0         72743    C    python3.11                                             530MiB |\n|   0          1007    G    NotificationCenter                                     170MiB |\n|   0          3197    G    WeType                                                 216MiB |\n+-----------------------------------------------------------------------------------------+\n```\n\n## ✨ Features\n\n- 🚫 **No sudo required** – Uses private macOS APIs (`IOReport`, `IOHIDSensors`, `SMC`) for sudoless operation.\n- ⚡ **Ultra-Fast \u0026 Lightweight** – Optimized startup (\u003c50ms) using targeted `sysctl` and `ioreg` calls.\n- 🔋 **Power Monitoring** – Displays SoC power consumption (Usage) against chip TDP (Cap).\n- 🌡️ **Smart Thermals** – High-accuracy GPU/SOC temperature readings with sensor fallback logic.\n- 📋 **Robust Process Listing** – Lists active GPU processes with full name resolution (no truncation for paths with spaces).\n- 🔍 **C/G Classification** – Categorizes processes by Type (`C` for Compute, `G` for Graphics).\n- 💾 **Memory Usage** – Detailed breakdown of unified memory utilization.\n- 🔄 **Watch Compatible** – Default **100ms** sampling interval for smooth real-time monitoring.\n- 📦 **Zero Dependencies** – Pure Python, utilizing `ctypes` to interface with macOS frameworks.\n\n## 📥 Installation\n\n```bash\npip install apple-smi\n```\n\n## 🚀 Usage\n\n### Command Line Options\n\n```bash\n# Basic usage\napple-smi\n\n# Set sampling interval (default: 100ms)\napple-smi --interval 250\n\n# JSON output for integration with other tools\napple-smi --json\n\n# Continuous monitoring (highly recommended)\nwatch -n 0.1 apple-smi\n```\n\n### Process Filtering\n\nBy 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:\n\n```bash\nAPPLE_SMI_SHOW_ALL_PROCESSES=1 apple-smi\n```\n\n### Backends\n\n`apple-smi` automatically selects the best available backend:\n\n1. **IOKit (Default)**: Uses undocumented IOKit APIs for **sudoless** monitoring.\n2. **Powermetrics (Fallback)**: Uses the system `powermetrics` tool (requires `sudo` or root privileges).\n\n| Variable | Values | Description |\n|----------|--------|-------------|\n| `APPLE_SMI_BACKEND` | `iokit`, `powermetrics` | Force a specific backend. Default: auto-detect. |\n| `APPLE_SMI_SHOW_ALL_PROCESSES` | `0`, `1` | Show all GPU processes (G+C). Default: `0`. |\n\n## 🔧 Requirements\n\n- macOS on Apple Silicon (M1, M2, M3, M4, M5)\n- Python 3.10+\n\n## 📝 License\n\nMIT License – see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeahdongcn%2Fapple-smi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeahdongcn%2Fapple-smi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeahdongcn%2Fapple-smi/lists"}