MacStats

Native menu bar monitor for network speed, CPU, RAM and temperature, with the busiest apps one click away.

Install

curl -fsSL https://raw.githubusercontent.com/openhoangnc/mac-stats/main/install.sh | bash
MacStats 1.0.16 in a dark menu bar with its menu open: temperatures, top CPU and memory apps, Open Activity Monitor, the display and update settings, and Quit

MacStats is the Mac counterpart to Taskbar Stats. It keeps live system numbers in the menu bar and puts the apps using the most CPU and memory one click away. It is written in Swift with no third-party dependencies and runs on Apple silicon and Intel Macs with macOS 11 or later.

In the menu bar

The status item has three columns, each with two lines:

Column Top line Bottom line
Network Upload speed Download speed
CPU and memory CPU load in % RAM in use, in GB
Temperature CPU temperature Unit, °C or °F

Speeds scale between B, K, M and G per second and count the Wi-Fi and Ethernet interfaces. RAM in use is active, wired and compressed memory. The temperature is the average of the CPU sensors, or the hottest one if you choose that in the menu.

Colours move from green through yellow to red: CPU and RAM by percentage, temperature from 35 °C to 85 °C, and network speed on a log scale from 1 KB/s to about 30 MB/s. Each colour is tuned separately for dark and light menu bars so it stays readable on both. The network and temperature columns can be hidden, and the item shrinks to fit.

The MacStats menu bar item drawn on a dark and on a light menu bar: upload and download speed, CPU load and RAM in use, and CPU temperature, in green to orange
The same readings on a dark and on a light menu bar, enlarged.

The menu

Click the item, with either button, to open the menu:

  • Temperature: CPU average, CPU hottest and, on a MacBook, the battery
  • Top CPU and Top Memory: the three apps using the most, measured when the menu opens. Helper processes count towards their app, so a browser’s many renderers show up as one browser. Only your own processes are listed, which leaves out system daemons. (The app names in the screenshot at the top of this page are examples.)
  • Open Activity Monitor for the full breakdown
  • Show Network Speeds and Show CPU Temperature
  • Launch at Login, which writes a LaunchAgent and, on macOS 13 and later, also registers a login item with SMAppService
  • Install Updates Automatically
  • Update Interval: every 1, 2 or 5 seconds
  • Temperature Unit: Celsius or Fahrenheit
  • Menu Bar Temperature: CPU average or CPU hottest
  • GitHub Repository, Check for Updates… and Quit MacStats

MacStats has no Dock icon and no Command-Tab entry; it lives only in the menu bar.

Temperature sensors

At launch MacStats asks the System Management Controller (SMC), through IOKit, which of the known temperature keys answer on that Mac. On Apple silicon, from M1 to M5, that covers the performance cores, efficiency cores and general CPU sensors. On Intel it uses the per-core sensors, or one summary sensor (die, package, proximity or heatsink, in that order) when there are none.

On Apple silicon each sensor appears under up to four keys. One is the live reading, one a recent peak, and two are those values plus a fixed offset. MacStats averages the live readings, takes the hottest from the peaks, and ignores the offset keys. Averaging all four, as versions before 1.0.15 did, read about 4.6 °C high on an M1 MacBook Air. The battery temperature comes from the battery cell sensors, which desktop Macs don’t have.

Updates

Once a day MacStats asks GitHub for the latest release. When there is a newer one, it downloads MacStats.zip and checks the file’s SHA-256 digest from GitHub, the bundle ID, the version, the minimum macOS version and the code signature before swapping the app in place and relaunching. It never restarts while the menu is open.

Updates install automatically by default. Turn off Install Updates Automatically and a new version appears in the menu as Update to version instead. Copies you build yourself never update on their own; Check for Updates… switches one to the latest release. When several macOS accounts share /Applications/MacStats.app, an update installed from one account is picked up by the others.

Install and remove

The command at the top of this page downloads the latest release, installs it in /Applications and starts it. Run from a clone of the repository, ./install.sh builds a universal binary from that source instead. To remove MacStats with its login item and preferences:

curl -fsSL https://raw.githubusercontent.com/openhoangnc/mac-stats/main/uninstall.sh | bash

Both scripts stop only your own copy of MacStats, not those of other accounts on the same Mac.

In Lightspot, typing macstats finds a row that runs this installer in your terminal. See installers in Lightspot.

How it stays light

  • Built by build.sh calling swiftc directly with size optimisation and dead-code stripping, without an Xcode project; the release download is 1.6 MB
  • Reads CPU, memory and network counters through Mach and BSD calls (host_processor_info, host_statistics64, getifaddrs), and checks interface names without allocating strings on each tick
  • Lets macOS coalesce its timer with 25% tolerance, and hands freed memory back to the system at launch and every 30 seconds
  • Rebuilds the menu bar text only when a displayed value changes

Support

Found a bug or have an idea? Open an issue on GitHub.