gentpan dc5c987b96 菜单栏风格、面板浅色与深色主题,修复面板打不开
- 菜单栏八种风格整体套用、可按指标单独指定,网速三种样式,悬停显示完整读数,字号缩小并统一
- 面板浅色、深色实色主题与一键切换,液态玻璃改为可选
- 修复关闭液态玻璃后面板内容尺寸翻倍导致看起来打不开,首次打开时高度偏小
- Developer ID 自动签名,辅助工具按自身签名团队校验调用方,新增发布脚本
- 更新日志、README、截图同步
2026-09-13 04:09:02 +05:00

OpenStats

OpenStats

Your Mac at a glance — CPU, GPU, memory, network and temperatures in the menu bar, with fan control, keep-awake and one-click cleanup.

Release Downloads Stars Last commit Commit activity CI macOS License

OpenStats is a macOS menu-bar app that shows what your Mac is doing right now — per-core CPU load, GPU, memory pressure, network speed, disk, battery, temperatures and fans — and lets you act on it: spin the fans up, keep the Mac awake with the lid closed, clear caches. Everything is read on your own Mac. No account, no telemetry, no network access at all.

Download · Website · Changelog · Architecture

English · 简体中文


Install

OpenStats has not had a release yet. The first one will be a .dmg on Releases, signed with a Developer ID certificate and notarized by Apple, followed by a Homebrew cask. Until then, build it from source — see Build & run.

Requires macOS 14 (Sonoma) or later; the panel uses Liquid Glass on macOS 26 and later. Developed and tested on Apple Silicon. The interface is in Simplified Chinese.

Recent updates

Not released yet · 29 changes in development · full changelog (kept in Chinese)

2026-09-13 · Unreleased · 18 added · 5 style · 6 fixed

Added

  • 菜单栏显示 CPU、GPU、内存、网速、CPU 温度和风扇转速。
  • 菜单栏风格:双行文字、单行文字、图标、圆环、饼图、柱状历史、电量条、状态圆点八种,整体选择一种统一套用,也可以给个别指标单独指定。设置里每种风格都有用示例数据画出的预览和说明,柱状历史注明是最近 10 次采样的变化。
  • 网速有双行圆点、双行箭头、单行三种样式,绿色上传、蓝色下载,带完整单位。
  • 鼠标悬停在菜单栏图标上显示完整读数。
  • 下拉面板分为概览、进程、散热、防休眠、清理五页。概览页顶部是健康评分和芯片、内存、系统版本、运行时长、机型徽章,下面是 CPU 柱状历史、GPU 折线、内存面积图、磁盘、网络双线、风扇三列卡片,以及核心负载、电池环形图、高占用进程和快捷开关。
  • CPU 按超级核、性能核、能效核分组显示各核心负载;内存口径与活动监视器一致,并显示内存压力;网速读取 64 位计数器,大流量下不会回绕。
  • 温度与风扇:启动时枚举一次 SMC 键并按前缀归类,不按芯片型号硬编码,显示 CPU、GPU、内存、电池和掌托温度。
  • 按界面需要分级采样:面板收起时只采集菜单栏用到的指标,锁屏、屏幕休眠和系统睡眠时暂停。
  • 风扇调速:自动、降温、强冷、自定义四种模式。自定义模式下 CPU 达到安全温度会自动交还系统控制,应用退出或断开连接时风扇恢复自动。
  • 防休眠:屏幕保持常亮、仅系统不休眠、合盖后继续运行,可设定持续时间;使用电池且电量低于下限时自动关闭合盖运行。
  • 辅助工具:通过 SMAppService 注册,只提供设置风扇转速、切换合盖不睡眠、刷新 DNS、释放内存几个固定操作;运行时读取自己的签名团队,只接受同一团队签名的 OpenStats 调用;异常退出后下次开机自动恢复风扇与睡眠设置。
  • 清理:扫描应用缓存、日志与崩溃报告、Chrome / Edge / Brave / Arc / Firefox / Safari 缓存、Xcode 编译缓存、模拟器缓存、npm 缓存、Xcode 归档、未完成的下载、安装包和废纸篓。按类别显示大小,可展开查看具体项目;清理前二次确认,操作写入 ~/Library/Logs/OpenStats/cleanup.log。
  • 清理的安全边界:只清理白名单目录,钥匙串、密码管理器、VPN、Cookie、历史记录一律不碰;正在运行的应用和浏览器自动跳过,执行前逐项重新校验。
  • 系统维护:一键刷新 DNS 缓存、释放内存,已安装辅助工具时直接执行,否则请求一次管理员授权。
  • 进程页按 CPU 或内存排序,辅助进程归并显示为所属应用。
  • 设置窗口:外观、登录时启动、刷新频率、温度单位、菜单栏显示项与样式、风扇安全温度、合盖运行电量下限、辅助工具安装与卸载。
  • 面板提供浅色、深色两套实色主题,顶部的太阳 / 月亮按钮一键切换,也可以跟随系统;液态玻璃背景改为可选(macOS 26 起)。
  • 截图命令 OpenStats --snapshot <目录>:用本机实时数据渲染面板、设置和菜单栏的浅色与深色截图。

Style

  • 菜单栏字号缩小并统一:两行布局为 7pt 标签加 10pt 数值,单行布局 11pt,网速两行 9pt;每种风格内部只用一套字号,指标之间留出更宽的间距。
  • 柱状历史去掉满高的灰色底槽,只保留一条淡基线,负载起伏更清楚。
  • 面板加宽为三列布局,高度按内容自动计算,常见屏幕上不需要滚动。
  • 更换应用图标,面板左上角和关于页使用同一图标。
  • 首次启动默认在菜单栏显示 CPU、内存与网速。

Fixed

  • 深色菜单栏上 CPU、RAM 小标签颜色过深,几乎看不清。
  • 面板打开后高度会再调整一次、内容轻微回弹,看起来在抖动;面板打开时点击菜单栏图标关闭,会立刻又被打开。
  • 风扇被其他程序设为手动模式时,误显示为由 OpenStats 控制。
  • 风扇转速、PID 等数字出现千分位分隔符,例如 1,350 RPM。
  • 关闭液态玻璃后点击菜单栏图标,面板看起来打不开:面板内容被放大成两倍,窗口里只显示空白的一角。
  • 面板第一次打开时高度偏小:打开瞬间温度、风扇、进程等数据还没采集,现在启动时先完整采集一次。

Activity

Commits per day over the last 26 weeks

Star history

At a glance

Overview, dark Overview, light

Where the numbers show

Menu bar

  • Eight styles, chosen once for every metric: two-line text, one-line text, icons, rings, pies, history bars, level meters and status dots. Any metric can be given its own style; Settings previews each one with sample data and says what the shape means.
  • Network speed in two rows with dots or arrows, or on one line — green for upload, blue for download, always with its unit (KB/s, MB/s, GB/s).
  • Small and consistent type: 7 pt labels over 10 pt figures, 11 pt on one line, 9 pt for network speed. Figures are fixed-width, so the bar does not jitter. Hover for every reading.

Menu bar

Panel — click the menu-bar item.

  • Overview. A health score with badges for the chip, memory, macOS version, uptime and model; then CPU history as bars, GPU as a line, memory, disk, network and fans in three columns; per-core load grouped by core type (super, performance, efficiency); battery as a ring; the busiest processes and quick switches.
  • Processes. Sorted by CPU or memory; helper processes are shown under their app.
  • Thermal. CPU, GPU, memory, battery and palm-rest temperatures, and the fans.
  • Keep awake. Keep the display on, keep only the system awake, or keep running with the lid closed — for a set time or indefinitely.
  • Clean. Scan, review, clean. See Cleanup.

The panel sizes itself to its content and needs no scrolling on common screens. Esc closes it. Light and dark themes, switched from the panel's header or following the system; Liquid Glass is optional.

Thermal Keep awake

Fans and sleep

Fan mode What it does
Auto Hands the fans back to macOS
Cool Holds them at 60% between minimum and maximum speed
Max Full speed
Custom A slider, anywhere in the fan's range

In Custom, the fans are handed back to macOS the moment the CPU reaches the safety temperature (95 °C by default). Quitting OpenStats, or the app crashing, restores automatic control. Running with the lid closed switches itself off on battery below a floor you choose.

Both need system privileges, provided by a small helper registered with SMAppService and approved once in System Settings → General → Login Items. The helper offers a fixed set of operations — set a fan's target speed, return fans to auto, toggle pmset disablesleep, flush the DNS cache, purge memory — and never runs arbitrary commands. It checks the caller's code signature, restores fans and sleep when the app disconnects, and after an unclean exit restores them at the next boot.

Cleanup

  • What it scans. App caches, logs and crash reports, browser caches (Chrome, Edge, Brave, Arc, Firefox, Safari), Xcode DerivedData, simulator caches, the npm cache, Xcode archives, unfinished downloads, installers and the Trash.
  • Review first. Sizes by category, every rule expandable to its items, a second click to confirm. Caches and logs are deleted outright so the space comes back at once; downloads go to the Trash. One switch sends everything to the Trash instead.
  • Safety. Only allow-listed folders are ever touched. Keychains, password managers, VPNs, cookies and history are off limits. Caches of running apps are skipped, browsers must be quit first, and every item is checked again right before it goes. Each action is logged to ~/Library/Logs/OpenStats/cleanup.log.
  • Maintenance. Flush the DNS cache and purge memory — through the helper if it is installed, otherwise after a one-time administrator prompt.

Cleanup

Your data

OpenStats makes no network connections. Metrics come from the kernel (host_processor_info, host_statistics64, sysctl), IOKit and the SMC on your own Mac. Preferences live in the app's user defaults and contain nothing personal. There is no analytics and no telemetry.

Build & run

Requires macOS 14+, Xcode 26 or later (the macOS 26 SDK for Liquid Glass; CommandLineTools alone lacks the SwiftUI macro plugins) and XcodeGen.

brew install xcodegen
make run                  # generate the project, build Debug and launch
make install              # build Release, install into /Applications and launch
make test                 # unit tests: metrics, SMC decoding, cleanup safety
make open                 # generate the project and open it in Xcode

The app is a menu-bar agent, so there is little to screenshot. Render the surfaces with live data instead:

build/DerivedData/Build/Products/Debug/OpenStats.app/Contents/MacOS/OpenStats --snapshot ./snapshots

Glass and vibrancy exist only on screen. To measure the panel while it is open, launch with --show-panel, which opens the panel and pins it.

After editing CHANGELOG.md, run python3 Scripts/sync_changelog.py to refresh the recent updates above and the activity chart.

Distribution

Developer ID only, not the App Store — the sandbox forbids talking to the SMC, reading other apps' caches and installing a privileged helper, which is most of the feature set.

What you have What others get
Nothing Ad-hoc signature — runs on your Mac only. Others see "OpenStats is damaged".
Developer ID certificate Hardened runtime. Others see "Apple cannot check it for malicious software".
Certificate + notarization Gatekeeper accepts it — the normal "downloaded from the internet" prompt.

make build and make install sign with the first Developer ID Application certificate in the keychain and fall back to ad-hoc without one. The helper reads its own team at run time and accepts only callers signed by the same team.

make release                          # sign, notarize, staple, build the DMG and a Homebrew cask
NOTARY_PROFILE=OpenStats make release # use another notarytool keychain profile
SKIP_NOTARIZE=1 make release          # an unnotarized DMG for testing on this Mac only

Scripts/release.sh refuses to produce a DMG that Gatekeeper would still reject.

Architecture

  • Packages/OpenStatsKit/Sources/SMC — SMC reads and writes, fan control, temperature sensor discovery.
  • Packages/OpenStatsKit/Sources/Metrics — samplers for CPU, memory, network, GPU, disk, battery, processes and sensors, and MetricsHub, which samples only what is on screen.
  • Packages/OpenStatsKit/Sources/Cleaner — cleanup rules, the safety guard, scanning and cleaning.
  • Packages/OpenStatsKit/Sources/HelperShared — the XPC protocol and maintenance commands.
  • Packages/OpenStatsKit/Sources/OpenStatsUI — design tokens, the panel, settings and the menu-bar renderer.
  • Helper/ — the privileged helper and its launchd plist. App/ — the entry point.

More in ARCHITECTURE.md. Every change to the app is logged, dated, in CHANGELOG.md.

Acknowledgements

OpenStats builds on these open-source projects. Thank you.

Project Author License What OpenStats took
Stats Serhiy Mytrovtsiy MIT SMC access, the Apple Silicon fan unlock sequence and the menu-bar mini widget metrics
Mole tw93 GPL-3.0 Which folders are worth cleaning and which must never be touched; the cleaner is an independent Swift implementation and contains no Mole code
QuotaBar GiantAccel, LLC MIT This README's layout, the changelog sync and the activity chart

Details in ThirdPartyNotices.md.

OpenStats is an independent third-party app. It is not affiliated with, endorsed by, or sponsored by Apple or any other company it mentions. Their names and logos belong to their respective owners.

License

MIT — see LICENSE.

S
Description
轻量原生的 macOS 菜单栏系统监控:CPU、GPU、内存、网络、温度,支持风扇调速与防休眠。Swift 6 + SwiftUI,液态玻璃界面。
https://getopenstats.com
Readme MIT
25 MiB
0 Stars 1 Watchers 0 Forks
Languages
Swift 81.5%
HTML 5%
JavaScript 3.9%
CSS 3.1%
Go 2.8%
Other 3.7%