风扇控制(--fan-control/--fan-set/--fan-auto)会写 SMC,必须用 sudo 运行,否则写入被静默拒绝;--overlay 的 FPS 指标在 macOS 15+ 需给终端授予屏幕录制权限,否则显示 0;Prometheus 服务默认关闭,需用 -p 显式开启。
mactop
metaspartanMIT活跃维护在终端里实时查看 Apple Silicon Mac 的 CPU、GPU、内存和功耗占用,类似 top 但针对 M 系列芯片优化,适合跑本地模型时盯资源。
mactop - Apple Silicon Monitor Top
brew install mactop
mactop仅支持 Apple Silicon(ARM64),需 macOS Monterey 12.3 及以上;README 未提及显存等要求。
Apple Silicon 上的终端版 top,实时查看 CPU、GPU、功耗、温度和风扇状态
在终端里实时查看 Apple Silicon Mac 的 CPU、GPU、内存和功耗占用,类似 top 但针对 M 系列芯片优化,适合跑本地模型时盯资源。
核心能力
- 用原生 SMC/IOReport 接口读取指标,核心功能免 sudo
- 分 E-Core、P-Core、M5 S-Core 显示各核心占用
- 实时显示 CPU/GPU/ANE/DRAM 功耗与 GPU 频率
- 监控 DRAM 读写带宽与雷雳接口吞吐
- 内置 22 种布局,支持进程过滤与 F9 杀进程
容易踩的坑
- v2.1.6最新正式版2026-09-30 · 2026-09-30 09:27 UTC
Changelog
- af6b18dca47fdc166f968f49b5d7a6a0a8800338 ANE: add cluster label modes and fix compact title
- 0e7d82fb87165dcd56d29aae0f297a2a074554db ANE: extract gauge title and dual-cluster gating
- b3e754142f184cc83d0251fcf0782374d718299a Add Dracula as a built-in full palette theme
- b5c96b0abfe3b67587fc8e31cfff93028ba3d47c Add SMC fan-RPM candidate scanner to --dump-temps
- b3df2082ab73b4991da12fa94fc64239d9f34590 Add aneChartTitle and fix ANE power-state titles
- e6b3c3e1ad9f393f6b0848e25a8bbfdb1d642d77 Add dual-ANE cluster detection and history_soc per-die display
- 7561821a318386f3e461511b22aa8dd6b334ec1e Add headless fan control CLI
- a92d90c6572e49200f88f4cfd4da6a7486b9d518 Add memory pressure layout, UI & metrics
- 3ffd18e4b1f97cafd80202bb8c7b07a7f1e3be31 Add non-root ANE activity detection for M5 Max (macOS 27)
- 1730ed48d3d624077a3237dd1f4d7aa499c4b62b Add ports layout and listening-port monitoring
- 6c8a0207c90dfdc6dd983dcab43a00348a1cab6e Add theme regressions and socket bind fixes
- 8beca2212b1530e18094f185e97d9f2754f1fb0a Avoid unnecessary port collection, add tests, bump brew
- 220df7efeba860f50939b027afc03ee330f209bf Brew formula update for mactop version v2.1.5
- 3a05d16cebb3ae05418e9bccc77e87a6e21f2746 Bump version to v2.1.6
- a8554ece477e8e33b84f4fa600dd3029e04ba8e7 Decode all SMC numeric types so fans report RPM on M2 Ultra
- 9065cb5b3fcc61617e65c0cb82223cff270cb4ba Defer exclave/power-state ANE fallback to any working channel
- 5c87e4cc109c9dead8619a35242e52abeb79b5b2 Don't latch bandwidth mode for non-exclave ANEPowered tier
- 2ea5238749d769c85f51a8cc112150059bf4a599 Drain ANE service iterator to avoid over-cap io_object leak
- 46bf88bec73da61a65e2fe1346895b609c5cdd7a Drop M5 Max diagnostic scratch folder and brew formula bump
- 1c48b88ae2ac9f543e37086260ab85b13333cdd8 Fix ANEPowered gauge inner label; restore gocyclo gate after merges
- de248265b48fab88e61328f4216a4668b97a9a82 Fix DRAM bandwidth on M4 Pro/Max via PMP AMCC histograms
- d8893357980e278d05652ef49867502573045ca5 Fix memory usage collapsing to 0% under heavy anonymous load
- b0fdcabe7ae6a76936a3947817f4ed83c8bf0e23 Gate ANE display by exclave detection (binary ON/idle on M5/M5 Max)
- c49fdc3680ebe50daaa87bfcc027d1e0ad6c0ba5 Headless never engages screen recording (drop FPS counter entirely)
- 9ce10f9ced5334c85a9ac6eb7093c31660273c73 Improve SMC fan key diagnostic output
- 31c2942ec5b7e1b9ffc7ca503ad3af407c907b88 Merge ane-macos27-history-soc into main
- ff5a50c647fd9fbc20d90b5ae492bab696d74d16 Merge branch 'development' of https://github.com/metaspartan/mactop into merge-v2.1.6
- 5873e62cd1ce194dcb265c1bdda7d36f54c86242 Merge pull request #75 from metaspartan/development
- 308f7ba247fb752e8e02db72ddf8a8df82a9b5f5 Merge pull request #76 from Anemll/main
- 301c696c4fd0b330bf397c09b547f812c59c0528 Merge pull request #77 from omerXfaruq/feature/battery-charging-watts
- 621bf58440675da67cf24c92ba3fec7763ee0ff1 Merge pull request #91 from weiyou/fix/m4-pro-dram-bandwidth
- 81ac8ab232ce9b7ba7d2e77e14a168414b847606 Merge pull request #92 from SurefireStudios/feat/dracula-theme
- 87e199c25a098a4c6d969782534e2547018405ac Merge pull request #98 from STRML/fix/m5-ultra-power
- 7bc90ff205437c8b8be959cbb0b1f01d42ff7b40 Merge pull request #99 from sebastianrcnt/fix/m6-ane-idle-floor
- 32d86fd3c7ca21ddb0570979a95fcab274b625fa Read combined ANE RD+WR PMP channel (fixes 0% ANE on M5 Max / Ultra)
- 9eb407bd76fa0a40dd52064114db213fe4d0814c Show ANE ON/idle on history_soc (layout 19) for exclave chips
- 736818542c1792392e634dedcd71677c0c8cf728 Show instantaneous charging/discharging watts in power panel
- 0aacdeef0d714b4f00de20ed08f905b5b45b6fc9 Treat F2 as the idle DCS floor for ANE utilization on M6
- 7ea302dac3a19b59a6c32d0f57c576270ad0621c Treat PMP AMCC histogram floor as underflow, not 16 GB/s
- 3351a4f97ee105f6deb7563c3766993c7f6e9604 Use shouldRenderDualANEClusters for ANE info
- d4c81f2589c59df243a80b075e4f6e4710e92a7a chore: drop four comments that o
- v2.1.52026-06-14 · 2026-06-14 02:21 UTC
查看更新说明
Changelog
- 57b3f5f98164642cdf20b16474ec2f24a20ff5d6 ANE history derives from physical GB/s; saturation pins at 100%
- c5784aef8d4a261098bfc62dab0e9e4820b860b5 Add AMC bandwidth fallback for ANE usage (macOS 27 beta kills block energy)
- 0ad6e9f089aea57c456587b17a93512fe818f481 Add macOS 27/M5 ANE readout, ANE bandwidth, and history_soc layout
- a4e6c81550ac35734c6a2b24653e1c8bf6f19424 Add process list to history_soc; remove unused average histories
- fd73c475cca7adc9c4d248fbb52c68ede2d7c854 Address Copilot review findings; bump version to v2.1.5
- 26d1743c2630ee0fbff3a1e19f2a05cdc60be4c8 Anchor BW sampling window after the first IOReport snapshot
- 680e45e859f6514f1da2ec14577cf4b9ee1b1ab1 Atomic init ANE merge; energy alias buckets; GPU Eff title from plotted value
- c37f74cb254137ea65aa2fa3f3f3e4dfcb301e10 Bandwidth peak bounds all plotted series, not just DRAM total
- 45e2fe94c7ad516ba330c263c9c2b950894d7835 Brew formula update for mactop version v2.1.4
- b439fa5839e283ddaef984968a6a18bff66543bf Default ANE gauge to GB/s form when energy counters are provably dead
- 3d0d547d8b4e4d5502e4164c89b95986c2baedaf Don't re-derive M5 residency history from bandwidth
- 418af019efbce9ea3c7d0bd7944f285abeee500d Drop dead ANE wattage from history_soc displays (macOS 27+)
- 827d6df12e936a812751fb86941b2b38b944e983 Drop redundant ANE suffix from main title
- 559d592b9ae480a05bfc925ade57bbd9cbd7414d Fix EventThrottler data race on the pending state
- fde497b1b619b1dd331ae9e6c6e3de7289776390 Fix PMP ANE byte window, layout-toggle deadlock, history_soc chart widths
- 60800efc20292e675fb305c7b531dd48f0f0d29d Future-proof block-energy matching for Apple's pmgr/DPE migration
- 31908a4ffda042f2cecbb7fdca98b3fe48b328d7 Harden dead-counter latch; fix BW chart scale and GPU max-freq source
- 867ba55f89857706d8aae43df4145fbc68f35515 History charts honor custom theme colors during live updates
- 60cd5c65f45812ca7869fb6579e38d5130e73013 Include Total series in bandwidth chart Y-axis scaling
- 52e778ba0da56612686c7d8aa21a5cd1a01ce1a7 Keep ANE gauge in GB/s form once bandwidth mode is established
- e3a834d1a46f75b997eb8f142af1c2afb6d9dae1 Localize history_soc chart titles
- c69be826e8a8c4dc7fd2c89e5cc64b796c89f2db Merge PR #72 (M5 PMP ANE readout) with the AMC bandwidth fallback work
- 3cae3dc6d78d994b296bf5ece86c6755ad75915a Merge pull request #72 from Anemll/ane-macos27-history-soc
- c9e1f945013be6ba5706d4c62fe6a81e5d33ddcf Merge pull request #74 from metaspartan/development
- 05a180ed9f803bfb432f0d999d2beada460c14e8 Never trigger Screen Recording prompt in headless mode
- 81ae5025a17d0fa9a6d1c8be95996d2447d6036e Omit ANE from SoC power chart entirely when its counter is dead
- 1833d6743878e6279be947317bddfe15e5585e0d Power panel shows ANE bandwidth when energy counter is dead
- c0375097da600fe9c2f5ffc0a79530720ea2111b Remove process list from history_soc layout
- 43a327cc2c793a4ceb4b200fcb3fa6186b88e263 SSD chart peak label uses true max, not the Y-axis floor
- 55e2a13155709f80e85e3e908067a445950847ca SSD read chart uses decimal GB/s to match DRAM charts
- v2.1.42026-06-09 · 2026-06-09 04:30 UTC
查看更新说明
Changelog
- 0ff76454e1c555902e931b0e342a831136e9b9c9 Add Traditional Chinese (zh-Hant) locale
- cb5cfd7f498d2e20ecdfd3327828c4301db1c9c5 Add battery monitoring and memory BW layout
- 7cd3272aafd1d18f66793e4c26c01bc1a9f81c51 Added Shift+key reverse cycling for layouts, themes, and backgrounds.
- 3f06236688307913d3ff6f96908eaccb2199b831 Allow PMP fallback retry; report battery presence and charge independently
- 6135d061ec55279a9eb63416ad8ac13305727bc3 Brew formula update for mactop version v2.1.3
- b0f108375a4b17b87114b918390cc66331bbb515 Debounce config save to fix +/- keypress lag
- f4c0051ebb88859c52d16c8d009676e0d6bf7402 Don't treat Intel-era Ftst write as a fan-control failure
- 28a5ef857e02308ad79047fdadc73b7f946f214f Fix SMC fan mode ui8 handling
- 10cc2c588328448e862754ffbc271e966e70819f Fix Unicode-safe string truncation
- 01c4a43f07b43ab5cf4625b1e885d981cab106b9 Fix transient post-boot temp dip; add arch guard; rework DRAM BW source detection
- 248814551d45d6779224f1a4847979646ec116aa Gate headless battery on Displayable; make PMP merge atomic
- 44cf0c353796207ebfd70a4fe2b06849c7fba62e Match powermetrics thermal taxonomy; fix battery -1% and zh-Hant overrides
- f815df35be3a02368c1e35193e8dd15dd274a561 Merge branch 'development' into main
- a4b6612f85578a4c4739de9a0321482daac4ab74 Merge branch 'development' into remove-truncateWithEllipsis
- b8b709750f4b15e16503912fd2bbb208c98d8c80 Merge pull request #52 from ObsidianArch02/feat/xdg-path
- 96f24c62e0dd40445b00b251fca64deab76fbcd0 Merge pull request #54 from GiaoLee/codex/smc-fan-mode-ui8
- b7975748001aa26b90d88ef216c7d2c9069df64d Merge pull request #55 from pgodlews/fix-network-kbytes-metric
- 73bb2c515894d9f2559576d037e12132e05c1877 Merge pull request #56 from djnym/main
- 10038ec9fe38c1406654f2079678b719789f1bbd Merge pull request #57 from shyuan/feat/i18n-zh-hant
- c34cf3c5bcdc476e7ec08ac26db1194ec65fd4ef Merge pull request #59 from metaspartan/development
- 311c6a8398f69f884a14e5dbcf0f499305ba1ec9 Merge pull request #60 from abnormal749/remove-custom-max
- 658e36067fbb2622540152d90801a0e16de606e7 Merge pull request #61 from abnormal749/remove-truncateWithEllipsis
- 5da67d448ee05ef12c9e10763232226205a99025 Merge pull request #68 from DamienBlackwood/shift-reverse-cycle
- c4f1a8b4878d12c8cbc79060541066a2facf502f Merge pull request #69 from DamienBlackwood/interval-fix
- 48e97b1259c8fe51c0be791e0e983183fe5a5221 Normalize metrics units; update theme config paths
- ca9cefc11b318710b82c883aa8fc9cd907ddf1f8 Persist resolved language to currentConfig
- 94b1fc9f6b698258d2301ccfeff71b30235be7df Re-enable DRAM fallback if DCS counters stall after working
- d081f1fcb3791f590ef98dd171073e42fbeaa545 Remove unused hasBatteryCached flag
- f3bda60917b724c5417ea76a817ebefdcb08ec04 Reset fans to auto on all exit paths (q, SIGINT/SIGTERM/SIGHUP)
- 73d6bd11493a94684178e0de6f004eac86131f64 Surface fan-control write failures and root requirement
- 8126125d767dd2b0aa505dbde7895a67b0f31534 Translate battery and memory strings in locales
- c177212eadb04f79fb5fb1f6b7ff3a2112570460 Trim leading ':' from Prometheus port
- 242d7a7254b3fbf109747143a27c039a1a7fdf0a Update layout count to 19 in locales
- b81e6398f2ca23ff39932718083c989f31292389 Update metrics.go
- 84afa4b7249cc20f686c70afba347c1bd50b5cec Use NSProcessInfo thermal state on Apple Silicon
- 3aa97a4966d0ed673ca3c91de469966c998d39dc Use max helper to simplify bounds checks
- f32b89b3d8e0c5e263b583c9619e986b5a668055 Use notify API for thermal state
- 7fae7c28abe88809c98b13c249f6b72f8cb66fe6 Use range loop for innerBarWidth
- 2789bc1775a6e2d505730fbc3b5c0900229521aa Use real sample interval & cache HID services
- ad448255bf6c87e7eb594c0a9d79672c2f7e310f align prometheus metrics between headless and TUI mode
- 38f5bd5ec4747601a2203ad4df947adc7589093d feat: add xdg directory helpers
- 32acabae81150a3dd2545e5a2dbba82fd60995ce feat: honour xdg config home
- a5a6b81c63f8639c5c26ff7bc6eaf66afe70644e feat: honour xdg state home for logs
- 7e
- v2.1.32026-05-03 · 2026-05-03 21:11 UTC
查看更新说明
Changelog
- 0a096711aa0ed8a7a6b341d0ca06c6e4353c191d Add CGDisplayStream sourceRect and use 16x16
- 4b6cd1c5a8ca4801b7769fee88d69e7e3357c819 Add Menu_LabelText key to locales
- d0a1e4a228f74985fd08fbc448bd8e63c1555ec0 Add configurable menu bar label color
- 392fd8d600df1e0b186580506ff805b48a1c618e Add configurable overlay sections and settings
- 87b31b48b6e2ca74350250f29ad68f09b2722ab1 Add display FPS diagnostics and --dump-fps flag
- 603995f7847889f7c37018c5730a07a688bc4a0d Add drag-to-reorder for overlay settings
- 95bdf3813e31b41cd1195687243d99506e08ed60 Add i18n locale TOML files
- 6f4e42be1b14551f48847f8bb94224b604ab07a7 Add i18n support and localize UI strings
- 3d143e40e3f69f8432f90dc86b779c8f9bf1fa3b Add numeric thermal level; remove early CLI i18n init
- 89f734a56989b344bd09315f3d57133b20e0730e Add unified shutdown and conditional OSThread lock
- 56b2be9ba45d999128afb65f6d704d199a99397a Avoid holding NVMe SMART plugin; round temps
- 71fc255e678631b494e00349c2617cc06e2421e1 Brew formula update for mactop version v2.1.2
- cce0557e8391a3e43327acc3bf13b82bec825b41 Copy default slices; use unsafe.Slice for C buffer
- 852c0b01dd1881ed34a443aa7cf14f7a38619028 Create netfilter_test.go
- 26c76f95728f1a55f9b965fc32dada499ef68403 Fix display FPS error paths and SOC fallback
- eff4cd8214d74860ab5236c06c72826970cf5464 Init i18n and handle DFPS start failure
- c9b91a95d2feef6f71d9593ada3fefee18d2e48b Integrate i18n/localization across UI and CLI
- 1e6470c6889ba5b8c6d2c4d5a998b32b87be432a Localize fan modes and temperature categories
- c37bdd65bd96425f9d78d8e05781c85c8ee358d1 Lock main thread and add worker shutdown
- 43f49089ee0725587117bea6d2a30a8447df6d0d Merge pull request #44 from metaspartan/development
- 2e2e15f360d28d4224d3d125b14261480c88df33 Merge pull request #49 from pineapple-farm/add-download-chart
- 7c04842496a41c8b0f34c636de8a2632552ffed9 Pre-resolve language and init i18n early
- 6417ee4df010094439a1a2adb181a6743a4756ff Scope close(done) recover; drop DRAM flag
- e68110ee664233943224f6ae23fb7f137cd1f96f Show loading screen and async DRAM calibration
- 11c448af25c7e0b87d416f30c169a2100a4d5fa5 Show permission warning when FPS stream fails
- 0564520174bae13c977f4a2af94ccef1b553cf43 Update README.md
- 270fd406345f684b79b6b351395da58bb8e646de Update app.go
- c84749f8bdc8bbb5857e41180bfe3212c027fd6f Update app.go
- d14b1159b900de31ea036720557318de9f2ecac4 Update app.go
- 99927575cff8cfd4e2de85e48ed117951dc409af Update globals.go
- 28b88a6a37f86787de0ad3325030818088945823 Update menubar.m
- 9049726cac1aa543843b1bf79c3cd636653e70f8 Update menubar.m
- 4f7421caab4be1ed1d9968dab24e2ac91c5fc435 Update native_stats.go
- 0afde1aae37022aff45c1ec856e31f058eb60a64 Update overlay.m
- 191e8161bb9cc5cb5c5c1c53f204ed87964bd8e7 Update sys_info.go
- fa77b051a2a4ffedb8a6f9e8830f3743c12b880f Use confirm body i18n; check overlay opacity flag
- a11080a3032e04a1496fd22864c4d908d7e8798a Use decimal units for disk sizes
- 9e52712eb54e888c1c59de5fc34d147f57c7756d Use sysctl C API; remove subprocess calls
- 997001c9eb9017dde6b28340c1e9ed4cf46bee54 docs(readme): add ClawHub download history chart
- 0a3a50dfa27520e49ebc6219a9b8a94983ec30a1 overlay: preserve section order and refactor drawing
- v2.1.22026-03-28 · 2026-03-28 22:40 UTC
查看更新说明
Changelog
- c72ca70821bdcd79524e3ecacb16d287dced4b77 Add --dump-debug diagnostic dump
- cd83ee5631d13d8860cf9a98f3dfb25d9cd72d60 Add --foreground flag and tweak IOReport key check
- 5ab6c713412b489916f4c6f6661cd160ba6ffa51 Add CLI flags; fix temp enumeration & overlay
- cbf58b720702f9e745f96f0e4329c415677d2bfa Add NVMe SMART temperature support
- 9f4b8b67238093eb25503469e36b8de1b319998a Add category-aware temperature filtering
- d1a4c4543acce0b74f2c4c5764cbe6c53e7a04b6 Add display FPS counter and headless metrics
- 3bfa0d70a75af0f35deb53b019ad89386e20fa80 Add dump-temps diagnostic and renumber cores
- d587dc64ad3dc3a777f8b4a104d40251d27aad64 Add frame interval metric and sparkline
- 4fb5948c4c06dd0b877a732cef756fed16298b63 Add macOS overlay HUD and worker process
- 3fcd610b3c3cd1b6bc9e1fb14e56cb7e8d25f8c3 Add overlay expand toggle and refactor net/disk UI
- cbcfd2479094f091bda10654b1967fef41ffc833 Add overlay opacity control and FPS counter
- dfceb2e8c46c78222c31a6d3ace8af909a887f22 Auto-scale sparkline for high-refresh displays
- ca429fd1dca896002d09c35ef07bdbdf6ad5df87 Brew formula update for mactop version v2.1.1
- 5358c72d1fb75b591bc2264d190657c9a20209e4 Cache full process command to avoid proc_pidpath
- fc187346486d0127e336cc82e00f0c5950d9d76e Clamp ANE percent and reorder IO init
- 01c742f86d41f165a88ede0af5435fa8dd872323 Display CPU cluster frequencies in TUI title bar
- 6576d7ff2428cbe5e25f02dc7e93719a7d988619 Enable ObjC ARC and add autoreleasepools
- f29f1f9e7966bb8f4017f486e9acaefc6e79ea67 Fix frequency flicker on multi-die chips and retain last known frequency
- 05fc4688cdf3f9922aa46001ddaf487594b85c97 Increase temp sensor capacity; add S-core support
- add94eb1e94273420819e15d08011fcc8c08fbbd Merge pull request #35 from metaspartan/development
- 68aead6c561fa5e3057c92fbf1e9bc98d4b7c96d Merge pull request #37 from ssp3nc3r/feature/cpu-cluster-frequency-display
- ad75a7d7dc70049c92bec632cfe88418ea35ad24 Optimize HID/IOReport performance and sensor caching
- 954b3bce6f1c123eaf65804ad16d0d92ff5afb89 Propagate CPU core usages and avg into metrics
- 6edaa9af999dfb0785b6567d1cd704421af8efb0 Refactor app: extract CLI parsing and helpers
- 27aa021d0e85997a9dedc329611d6757a3887e49 Refine sensor caching, overlay, and proc caching
- ee05710167e8349e4171cb5c5b641b1526f60bf2 Register foreground flag; guard IOReport sub
- cc3000e3c3a067856335a8d69207abbdeff2b3b4 Remove CPU frequency from compact gauge title
- 3b93ced5ba691c307dca9621e168b71ca1815d69 Resolve merge conflict with development
- 346eb0d3a49b2551ec2cc345baf488cbb20cb2a3 Respect NVMe SMART temps and fix WiFi link check
- dd07a6230aaa14891a7e4ef9c3cb3b9771089f49 S-core vs SSD sensor detection; overlay cleanup
- 2c88a498a03bcfa5501db73f7178cbdcbaaab229 Support --foreground=VALUE and simplify fan bar
- af191cd98b744fb1bc8a1dacbb723fe709e4043a Treat 's' key as HID Score in power sampling
- d445580e8603e9d142a96b0c9de4b861cf50efbb Update README.md
- 790bafec7295c85f5b385622cf61e39eed518f81 Update app.go
- 65e4dce5edd6c9fc83c9e0d9cf1ac733b43170b8 Update app.go
- 4d4f302c5e9783393a6880973f5411c0bc3843f3 Update displayfps.m
- de090e801ce0ffa617de87b3f9765dce43b1fb3e Update globals.go
- 9bb3d179b3acb33170139d8a65450e4f02a50fbb Update headless.go
- 3b896956c4556c41d421d8e7853277008e1f8298 Update ioreport.m
- f7dd027173699058eed780b6f1cabad9ea48698f Update ioreport.m
- bc00ad2d37865bbbfe806ca964e2eb73e3d24f92 Update ioreport.m
- b4eccba9a9d93db73434f83c4bd7d3a0a98e71a5 Update overlay.m
- 71524c36a1e665be533694c717269f411b60725a Use HID per-core temps and skip SMC cores
- 868bf7122f72f75179bd62913ec70ec22537bdd5 Use fastest available link speed in UI
- 753645f56622ac2602041e6653bf650409f302b7 Use validated HID per-core temps, unify grouping
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
mactop
mactop is a terminal-based monitoring tool "top" designed to display real-time metrics for Apple Silicon chips written by Carsen Klock. It provides a simple and efficient way to monitor CPU and GPU usage, E-Cores and P-Cores, power consumption, GPU frequency, temperatures, and other system metrics directly from your terminal

Compatibility
- Apple Silicon Only (ARM64)
- macOS Monterey 12.3+
Features
- No sudo required - Uses native Apple APIs (SMC, IOReport, IOKit, IOHIDEventSystemClient)
- Apple Silicon Monitor Top written in Go Lang and CGO
- Real-time CPU, GPU, ANE, DRAM, and system power wattage usage display
- GPU frequency and usage percentage display
- CPU and GPU temperatures + Thermal State
- M5 Super Core (S-Core) Support: Full support for Apple M5's new CPU architecture (E-cores, P-cores, S-cores)
- DRAM Bandwidth Monitoring: Real-time DRAM read/write bandwidth (GB/s) — AMC DCS byte counters on M1–M4, PMP AMCC rate histograms on M4 Pro/Max (no sudo), auto-calibrated power-based estimation on M5+ chips
- Comprehensive Temperature Sensors: All available SMC temperature sensors (CPU Die, GPU, Memory, SSD, Airflow, and more) with human-readable labels
- Fan Monitoring: Real-time fan RPM, target speed, mode (Auto/Manual), and visual RPM bars
- Fan Speed Control: Optional interactive fan speed control via
--fan-controlflag (writes to SMC), plus headless one-shot commands (--fan-set,--fan-auto,--fan-status) for scripts, cron, and SSH - Detailed native metrics for CPU cores (E-cores, P-cores, and S-cores on M5+) via Apple's Mach Kernel API
- Memory usage and swap information
- Network usage information (upload/download speeds)
- Thunderbolt bandwidth monitoring: Real-time throughput for Thunderbolt Bridge interfaces
- Thunderbolt Device Tree: Visual tree of connected Thunderbolt/USB4 devices and their speeds
- RDMA Support: Detection of RDMA over Thunderbolt 5 availability
- Battery Monitoring: Battery percentage and charging state on MacBooks (auto-detected; shown in TUI, headless output, and Prometheus metrics)
- Disk I/O activity (read/write speeds)
- Proportional per process GPU usage (experimental)
- Multiple volume display (shows Mac HD + mounted external volumes)
- Easy-to-read terminal UI
- 22 Layouts: (
lto cycle layouts) — includes a GPU + Memory focused layout with a DRAM read/write bandwidth history chart, a memory-pressure layout, plus a ports layout for listening TCP/UDP sockets - Memory Pressure: kernel pressure state (Normal/Warning/Critical) via
kern.memorystatus_vm_pressure_level, with approximate history for Activity Monitor-style green/yellow/red signal- New
history_soclayout (ato jump to it): four large history StepCharts showing CPU, GPU, ANE, and DRAM + ANE Bandwidth (Read/Write) side-by-side, with a compact process list at the bottom. Ideal for observing sustained load, on-device Neural Engine inference, and memory bandwidth behavior over time.
- New
- Persistent Settings: Remembers your Layout and Theme choice across restarts
- Customizable UI color (green, red, blue, skyblue, magenta, yellow, gold, silver, white, lime, orange, violet, pink, and more) (
cto cycle colors) - Customizable background color (
bto cycle colors) - Customizable update interval (default is 1000ms) (
-or=to speed up,+to slow down) - Process list matching htop format (VIRT in GB, CPU normalized by core count)
- Process Management: Kill processes directly from the UI (F9) with safe confirmation.
- Process Filter: Search and filter processes by name (
/) - Navigation: Enhanced Vim-like navigation (
gtop,Gbottom,j/kscroll) - Headless Mode: Output JSON metrics to stdout for scripting/logging (
--headless) - JSON Formatting: Pretty print JSON output (
--pretty) or set collection count (--count <n>) - Output Formats: JSON (default), YAML, XML, CSV, and TOON (
--format <format>) - Freeze: Pause/Resume process list updates (
f) - Party Mode (Randomly cycles through colors) (
pto toggle) - Optional Prometheus Metrics server (default is disabled) (
-p <port>or--prometheus <port>)- Exports: CPU/GPU/ANE usage, E/P/S-core averages, per-core usage (labeled by type), power components, DRAM bandwidth (read/write/combined), memory, network, disk, fan RPM, temperature sensors, thermal state, battery (on MacBooks), and more
- macOS Menu Bar Mode: Run as a native menu bar status item (
--menubar) with sparkline charts, CPU/GPU/Memory gauges, power metrics, DRAM bandwidth, fan RPM, and full system stats - Support for all Apple Silicon models
- Auto-detect Light/Dark Mode: Automatically adjusts UI colors based on your terminal's background color or system theme.
- Configurable Units: Customize units for network, disk, and temperature display (
--unit-network,--unit-disk,--unit-temp) - Multi-Language Support (i18n): 20 languages with automatic system language detection — English, Arabic, Chinese (Simplified & Traditional), Dutch, French, German, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Thai, Turkish, Vietnamese (
--langto override)
Install via Homebrew
You can install mactop via Homebrew! https://brew.sh
brew install mactop
mactop
Updating via Homebrew
brew update
brew upgrade mactop
Installation
To install mactop, follow these steps:
-
Ensure you have Go installed on your machine. If not, you can install it by following the instructions here: Go Installation Guide.
-
Clone the repository:
git clone https://github.com/metaspartan/mactop.git cd mactop -
Build the application:
go build -
Run the application:
./mactop
Usage
After installation, you can start mactop by simply running:
./mactop
Example with flags:
mactop --interval 1000 --foreground green --lang ja
Built-in Themes:
# Dracula
mactop --foreground dracula --bg dracula-base
# Catppuccin
mactop --foreground mocha --bg mocha-base
Custom Hex Colors:
# Use Dracula PRO theme colors
mactop --foreground "#9580FF" --bg "#22212C"
Headless Mode (JSON Output):
# Run once and exit (great for scripts)
mactop --headless --count 1
# Run continuously with pretty printing
mactop --headless --pretty
# Run with different output formats (json, yaml, xml, toon)
mactop --headless --format toon
mactop Flags
--headless: Run in headless mode (no TUI, output to stdout).--format: Output format for headless mode (json, yaml, xml, toon). Default is json.--count: Number of samples to collect in headless mode (0 = infinite).--pretty: Pretty print JSON output in headless mode.--intervalor-i: Set the update interval in milliseconds. Default is 1000.--foreground: Set the UI foreground color. Accepts named colors (green, red, blue, etc.), full palette themes (dracula, mocha, macchiato, frappe) or hex colors (#9580FF).--bgor--background: Set the UI background color. Accepts named colors (dracula-base, mocha-base, etc.) or hex colors (#22212C).--prometheusor-p: Set and enable the local Prometheus metrics server on the given port. Default is disabled. (e.g. -p 2112 to enable Prometheus metrics on port 2112)--unit-network: Network unit: auto, byte, kb, mb, gb (default: auto)--unit-disk: Disk unit: auto, byte, kb, mb, gb (default: auto)--unit-temp: Temperature unit: celsius, fahrenheit (default: celsius)--lang: Language override (e.g.,en,es,ja,zh). Auto-detects system language if not set. Priority: CLI flag >MACTOP_LANGenv var >config.json> system language.--fan-control: Enable interactive fan speed control (⚠️ writes to SMC — use with caution). Requires root: writing SMC fan keys is privileged, so you must runsudo mactop --fan-control. Without root every fan write is silently rejected (kIOReturnNotPrivileged) and the controls appear to do nothing.--fan-set <value>: Headless one-shot fan control (⚠️ writes to SMC, requiressudo): pin the fans to a target and exit. Accepts an absolute RPM (3000), a percent of each fan's min–max range (60%),min,max, orauto. See Headless Fan Control.--fan-id <n>: Apply--fan-setto a single fan ID instead of all fans.--fan-auto: Restore all fans to automatic control and exit (requiressudo).--fan-status: Print current fan state as JSON to stdout and exit (no root required).--menubar: Run as a macOS menu bar status item alongside the TUI.--overlay: Run as a floating overlay HUD window with FPS metrics. (Requires Screen Recording permission — see Permissions below)--dump-fps: Diagnostic tool that dumps display info, screen recording permission status, and tests CGDisplayStream at multiple output sizes. Useful for troubleshooting FPS display issues.--dump-temps: Diagnostic: dump all raw SMC temperature keys and exit.--dump-debug: Diagnostic: dump IOReport/HID/SMC/NVMe debug info and exit.--versionor-v: Print the version of mactop.--helpor-h: Show a help message about these flags and how to run mactop.
Permissions
mactop uses native Apple APIs and does not require sudo for core functionality (CPU, GPU, power, memory, temperatures, fans).
Screen Recording (required for FPS overlay)
The --overlay mode uses CGDisplayStream to track display frame rates (FPS and frame interval). On macOS 15 (Sequoia) and later, this requires Screen Recording permission for your terminal app:
- Open System Settings → Privacy & Security → Screen Recording
- Enable the toggle for your terminal app (Terminal.app, Ghostty, iTerm2, Warp, etc.)
- Restart your terminal if prompted
Without this permission, the overlay will still work but FPS and frame interval metrics will show 0 / -.
Tip: Run
mactop --dump-fpsto verify screen recording access and test CGDisplayStream on your hardware. This is useful for troubleshooting if FPS metrics still aren't appearing.
Overlay Customization
The overlay HUD (--overlay) supports customization via ~/.mactop/config.json. You can control which metrics appear in collapsed mode, their order in expanded mode, and the overlay opacity.
Collapsed Mode Sections
Choose which metrics appear when the overlay is collapsed (default: FPS, Frame, CPU, GPU, Memory):
{
"overlay": {
"collapsed_sections": ["fps", "cpu", "gpu", "memory"]
}
}
Expanded Mode Section Order
Reorder sections in expanded mode. Sections appear in the order listed:
{
"overlay": {
"expanded_order": [
"fps", "frame", "cpu", "gpu", "memory",
"power", "temps", "thermal", "fans",
"bandwidth", "gpu_freq", "ane", "network"
]
}
}
Available Sections
| Section | Description |
|---|---|
fps | Display FPS counter with sparkline |
frame | Frame interval (ms) with sparkline |
cpu | CPU usage bar with sparkline |
gpu | GPU usage bar with sparkline |
ane | ANE (Neural Engine) usage bar |
memory | Memory usage bar |
swap | Swap usage (only shown when swap is active) |
power | Power breakdown (Package + CPU/GPU/ANE/DRAM) |
bandwidth | DRAM bandwidth (GB/s) |
gpu_freq | GPU frequency and TFLOPs |
temps | CPU and GPU temperatures |
thermal | Thermal state |
fans | Fan RPM (only shown when fans present) |
network | Network throughput |
Persisted Opacity
{
"overlay": {
"opacity": 0.75
}
}
Theme File Support
Create theme.json in mactop's config directory to customize colors:
- If
XDG_CONFIG_HOMEis set to an absolute path:$XDG_CONFIG_HOME/mactop/theme.json - Otherwise:
~/.mactop/theme.json
Basic Colors
{
"foreground": "#9580FF",
"background": "#22212C"
}
Per-Component Colors (Optional)
Individual component colors that override the foreground:
cpu: CPU gauge, CPU cores widget, CPU history chartgpu: GPU gauge, GPU sparkline, GPU history chartmemory: Memory gauge, Memory history chartane: ANE (Apple Neural Engine) gaugebandwidth: DRAM Bandwidth history chart (falls back to memory color)network: Network box, Network sparklinespower: Power box, Power sparkline, Power history chartthunderbolt: Thunderbolt/RDMA boxprocessList: Process list border and text colorprocessListDim: Non-current-user (root/system) process text color (default: grey)processListSelected: Selected row foreground text color (default: auto contrast)systemInfo: System info box color
Example: Colorful Theme
{
"foreground": "#B0BEC5",
"background": "#212121",
"cpu": "#FF5252",
"gpu": "#448AFF",
"memory": "#69F0AE",
"ane": "#E040FB",
"network": "#FFAB40",
"power": "#FF6E40",
"thunderbolt": "#E91E63",
"processList": "#FFEB3B",
"processListDim": "#555555",
"processListSelected": "#FFFFFF",
"systemInfo": "#00BCD4"
}
Example: Dracula PRO Palette
| Element | Hex |
|---|---|
| Background | #22212C |
| Foreground | #F8F8F2 |
| Purple | #9580FF |
| Cyan | #80FFEA |
| Green | #8AFF80 |
| Pink | #FF80BF |
| Orange | #FFCA80 |
| Red | #FF9580 |
Priority order: CLI flags > theme.json > saved config.
Config and Log Paths
mactop supports XDG directory variables while preserving the original path layout when those variables are unset.
| File | XDG path when set | Legacy fallback |
|---|---|---|
| Config | $XDG_CONFIG_HOME/mactop/config.json | ~/.mactop/config.json |
| Theme | $XDG_CONFIG_HOME/mactop/theme.json | ~/.mactop/theme.json |
| Log | $XDG_STATE_HOME/mactop/mactop.log | ~/.mactop/mactop.log |
Relative XDG paths are ignored; XDG base directories must be absolute paths.
mactop Commands
Use the following keys to interact with the application while its running:
q: Quit the application.r: Refresh the UI data manually.c: Cycle through the color themes.b: Cycle through the background colors.p: Party Mode (Randomly cycles through colors)i: Toggle Info layout (displays system info)F(Shift+f): Toggle Fan & Thermals layout (fan monitoring + all temperature sensors)l: Cycle through the available layouts.o: Jump to the ports layout (listening TCP/UDP ports; press again to go back).m: Jump to the memory pressure layout (press again to go back).e: On the ports layout, toggle external-only filter.+or=: Increase update interval (slower updates).-: Decrease update interval (faster updates).F9: Kill the currently selected process (pauses updates while selecting).Arrow Keysorh/j/k/l: Navigate the process list and select columns.g/G: Jump to the top or bottom of the process list./: Search/Filter the process list by name (Esc to clear).EnterorSpace: Sort by the selected column.hor?: Toggle the help menu.
Fan Control Keys (requires --fan-control flag + sudo, only active in Fan layout)
Fan control writes to the SMC, which is privileged — run with
sudo mactop --fan-control. Without root the keys below have no effect (mactop will show a warning in the Fan panel). Note: on recent macOS the system thermal governor may also override manual fan targets.
+or=: Increase fan speed (+100 RPM)-: Decrease fan speed (-100 RPM)a: Toggle auto/manual fan mode0: Set all fans to minimum speed9: Set all fans to maximum speedR(Shift+r): Reset all fans to automatic control
Headless Fan Control
Fan control also works without the TUI — from scripts, cron jobs, or over SSH:
# Read fan state (no root needed) — JSON on stdout
mactop --fan-status
# Pin all fans to 3000 RPM (or a percent of each fan's min–max range, or min/max)
sudo mactop --fan-set 3000
sudo mactop --fan-set 60%
sudo mactop --fan-set max
# Pin only fan 1
sudo mactop --fan-set 2500 --fan-id 1
# Restore automatic fan control
sudo mactop --fan-auto # (equivalent: sudo mactop --fan-set auto)
Each command performs its SMC writes, prints the resulting fan state as JSON to stdout (human-readable messages go to stderr; --pretty is honored), and exits — exit code 0 on success, 1 on failure. After writing, mactop reads the fan state back and fails with a warning if the OS silently rejected the write.
⚠️ Unlike the interactive TUI,
--fan-setintentionally leaves the fans pinned in manual mode after mactop exits — that's what makes it usable headlessly. Nothing will restore automatic control until you runsudo mactop --fan-auto(or reboot). Pinning fans below their automatic speed under load can cause thermal throttling; the macOS thermal governor may also override manual targets on recent macOS versions.
Example Theme (Green) Screenshot (mactop -c green) on Advanced layout (Hit "l" key to toggle)

Example Headless Output (mactop --headless --count 1)
[{
"timestamp": "2025-12-22T18:16:57-07:00",
"soc_metrics": {
"cpu_power": 2.1959999999999997,
"gpu_power": 5.38552801,
"ane_power": 0,
"dram_power": 5.702,
"gpu_sram_power": 0.158,
"system_power": 37.47166092432617,
"total_power": 50.91318893432617,
"gpu_freq_mhz": 643,
"soc_temp": 62.562572,
"cpu_temp": 62.562572,
"gpu_temp": 58.38886
},
"memory": {
"total": 137438953472,
"used": 74062512128,
"available": 63376441344,
"swap_total": 5368709120,
"swap_used": 4094689280
},
"net_disk": {
"out_packets_per_sec": 589.4371024829012,
"out_bytes_per_sec": 196028.18012655922,
"in_packets_per_sec": 593.3256375185223,
"in_bytes_per_sec": 74461.55739710879,
"read_ops_per_sec": 0.32404458630175986,
"write_ops_per_sec": 40.18152870141822,
"read_kbytes_per_sec": 1.2961783452070395,
"write_kbytes_per_sec": 308.4904461592754
},
"cpu_usage": 15.140564910346725,
"gpu_usage": 53.51970510465884,
"core_usages": [
42.244224422442244,
37.17105263157895,
55.26315789473685,
37.704918032786885,
27.21311475409836,
21.241830065359476,
14.563106796116504,
6.148867313915858,
4.193548387096775,
1.9417475728155338,
30.718954248366014,
20.846905537459286,
1.9417475728155338,
1.2944983818770228,
0.3236245954692557,
0,
0,
0,
0,
0
],
"system_info": {
"name": "Apple M1 Ultra",
"core_count": 20,
"e_core_count": 4,
"p_core_count": 16,
"gpu_core_count": 64
},
"thermal_state": "Normal",
"thunderbolt_info": {
"buses": [
{
"name": "TB4 Bus 5",
"status": "Active (USB)",
"icon": "⏺",
"speed": "Up to 40 Gb/s",
"domain_uuid": "9FDBA52F-DF7C-425E-B67B-FB80F9E1DCD6",
"switch_uid": "0x05AC38BE5E390FE5",
"receptacle_id": "6",
"devices": [
{
"name": "ASM236X NVME",
"mode": "USB",
"info_string": "USB, SSD"
}
],
"network_stats": {
"interface_name": "en7",
"bytes_in": 0,
"bytes_out": 0,
"bytes_in_per_sec": 0,
"bytes_out_per_sec": 0,
"packets_in": 0,
"packets_out": 0
}
},
{
"name": "TB4 Bus 4",
"status": "Inactive",
"icon": "○",
"speed": "Up to 40 Gb/s",
"domain_uuid": "5DD6DE43-051D-4B32-B044-23E57AA0EEC8",
"switch_uid": "0x05AC38BE5E390FE4",
"receptacle_id": "5",
"network_stats": {
"interface_name": "en6",
"bytes_in": 0,
"bytes_out": 0,
"bytes_in_per_sec": 0,
"bytes_out_per_sec": 0,
"packets_in": 0,
"packets_out": 0
}
},
{
"name": "TB4 @ TB3 Bus 3",
"status": "Active",
"icon": "ϟ",
"speed": "20 Gb/s",
"domain_uuid": "AF4CE493-9005-4E9D-8B8B-0198D27BABA3",
"switch_uid": "0x05AC38BE5E390FE3",
"receptacle_id": "4",
"devices": [
{
"name": "Studio Display",
"vendor": "Apple Inc.",
"vendor_id": "0x0001",
"mode": "TB3",
"switch_uid": "0x0001AFBD0C588A00",
"device_id": "0x801F",
"info_string": "Apple Inc., TB3"
}
],
"network_stats": {
"interface_name": "en5",
"bytes_in": 0,
"bytes_out": 0,
"bytes_in_per_sec": 0,
"bytes_out_per_sec": 0,
"packets_in": 0,
"packets_out": 0
}
},
{
"name": "TB4 Bus 2",
"status": "Inactive",
"icon": "○",
"speed": "Up to 40 Gb/s",
"domain_uuid": "D589EEFE-98CF-42EC-A729-6C3E523AA321",
"switch_uid": "0x05AC38BE5E390FE2",
"receptacle_id": "3",
"network_stats": {
"interface_name": "en4",
"bytes_in": 0,
"bytes_out": 0,
"bytes_in_per_sec": 0,
"bytes_out_per_sec": 0,
"packets_in": 0,
"packets_out": 0
}
},
{
"name": "TB4 Bus 1",
"status": "Inactive",
"icon": "○",
"speed": "Up to 40 Gb/s",
"domain_uuid": "6DAC6FCD-E102-4CCD-9D01-A75540E660CA",
"switch_uid": "0x05AC38BE5E390FE1",
"receptacle_id": "2",
"network_stats": {
"interface_name": "en3",
"bytes_in": 0,
"bytes_out": 0,
"bytes_in_per_sec": 0,
"bytes_out_per_sec": 0,
"packets_in": 0,
"packets_out": 0
}
},
{
"name": "TB4 Bus 0",
"status": "Inactive",
"icon": "○",
"speed": "Up to 40 Gb/s",
"domain_uuid": "63A80A32-E70C-4F22-84BE-EDE632A5BA3E",
"switch_uid": "0x05AC38BE5E390FE0",
"receptacle_id": "1",
"network_stats": {
"interface_name": "en2",
"bytes_in": 0,
"bytes_out": 0,
"bytes_in_per_sec": 0,
"bytes_out_per_sec": 0,
"packets_in": 0,
"packets_out": 0
}
}
]
},
"tb_net_total_bytes_in_per_sec": 0,
"tb_net_total_bytes_out_per_sec": 0,
"rdma_status": {
"available": false,
"status": "RDMA Disabled (use rdma_ctl enable in Recovery Mode)"
},
"cpu_temp": 62.562572,
"gpu_temp": 58.38886
}
]
Confirmed tested working Apple Silicon chips
- M1
- M1 Pro
- M1 Max
- M1 Ultra
- M2
- M2 Pro
- M2 Max
- M2 Ultra
- M3
- M3 Pro
- M3 Max
- M3 Ultra
- M4
- M4 Pro
- M4 Max
- A18 Pro
- M5
- M5 Pro
- M5 Max
(If you have a confirmed working Apple Silicon chip that is not listed, please open an issue, so we may add it here!)
Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork mactop
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
What does mactop use to get real-time data?
- Apple SMC: For SoC temperature sensors, System Power (PSTR, or the DC-in keys PDTR/PD0R on desktops where PSTR reads 0), fan speed monitoring (FNum, F*Ac/Mn/Mx/Tg/Md), fan speed control via SMCWrite, and comprehensive temperature sensor enumeration
- IOReport API: For CPU, GPU, ANE, and DRAM power consumption (no sudo required) — DRAM GB/s from AMC DCS byte counters (M1–M4) or PMP
DCS BW/AMCC RD|WR|RD+WRhistograms (M4 Pro/Max; AMC Stats does not subscribe on those chips). DRAM power is also used for auto-calibrated bandwidth estimation on M5+ chips - IOKit: For GPU frequency table from
pmgrdevice - IOHIDEventSystemClient: Fallback for SoC temperature sensors
- NSProcessInfo.thermalState: For system thermal state (Nominal/Fair/Serious/Critical)
- Mach Kernel API (
host_processor_info): For CPU metrics (E-cores, P-cores, and S-cores on M5+) via CGO
License
Distributed under the MIT License. See LICENSE for more information.
Author and Contact
Carsen Klock - @carsenklock
Project Link: https://github.com/metaspartan/mactop
Disclaimer
This tool is not officially supported by Apple. It is provided as is, and may not work as expected. Use at your own risk.
Acknowledgements
- gotui for the modern terminal UI framework.
- asitop for the original inspiration!
- htop for the process list and CPU cores inspiration!