Skip to content
GithubAnantPublic

About

A small Mac app that shows which apps are using your RAM, swap and disk

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Memwatch

A small Mac app that tells you which apps are eating your RAM.

Memwatch

Why

My Mac kept going into swap and Activity Monitor wasn't much help. It lists every helper process on its own line, so Chrome shows up as forty "Google Chrome Helper (Renderer)" rows and you have to add them up in your head.

Memwatch groups processes by the app they belong to. So you get one row for Chrome, one for Slack, one for whatever Electron app you forgot was open, with the real total.

What it shows

  • RAM used, swap, compressed memory and memory pressure at the top. The numbers match Activity Monitor.

  • A breakdown bar: app memory, wired, compressed, cached files, free.

  • Every app, sorted by RAM, with its real icon. Click a row to see the processes inside it.

  • Compressed per app: the part macOS has squeezed in RAM or pushed out to swap. macOS doesn't report swap per app, so this is the closest you can get.

  • On disk: how much space the app itself takes on your drive. Handy when you're deciding what to uninstall. It's measured in the background the first time and cached, so big apps fill in after a few seconds.

  • Quit or force quit any app or process. Hover a row and click the ×. Quit asks the app to close normally; Force quit kills it right away. System processes like loginwindow are left alone. (This needs the app; the browser version is read-only.)

Hover any column header for a short explanation of what it measures.

Disk

Switch to the Disk tab to see what's filling up your drive. It starts in your home folder and lists everything in it, biggest first. Click a folder to look inside, use the path at the top to go back up, or jump to Applications or the whole disk. Hidden folders like .cache and .npm are included, since they're often the culprits.

Folders are measured in the background, so sizes fill in as they're counted. Big folders like ~/Library can take a minute. Some folders are protected by macOS. Memwatch shows those as "no access" instead of guessing. If you want them counted, add Memwatch under System Settings › Privacy & Security › Full Disk Access. Results are cached, so going back to a folder or reopening the app is instant. A folder is measured again when something is added to or removed from it directly, or when you click Rescan. Click Show on any row to find it in Finder. Memwatch never deletes anything, so you stay in charge of what goes.

Menu bar mode

Flip the Menu bar switch in the bottom-left corner (or use Settings, ⌘ ,) and Memwatch moves out of the Dock and into the menu bar. It shows your RAM used next to the icon, and clicking it opens a compact version of the window.

Menu bar popover

Settings also has "Open at login" and the refresh interval (1, 3, 5 or 10 seconds).

Install

You need macOS 13 or later, Python 3 and the Xcode command line tools (xcode-select --install gets you both).

git clone https://github.com/GithubAnant/memwatch.git
cd memwatch
./build.sh

That builds Memwatch.app and copies it to /Applications. Open it like any other app.

Don't want the app? The whole thing also runs in a browser:

python3 memwatch.py

Then go to http://localhost:8799.

How it works

There are no dependencies. It's two files:

  • memwatch.py reads top, ps, vm_stat and sysctl, groups processes by their .app bundle, and serves the page plus a small JSON API. App icons come from NSWorkspace (the same icons Finder uses) and are cached in ~/Library/Caches/memwatch.
  • Memwatch.swift is a thin native window around that page. It starts the Python server on a free port when you open the app and stops it when you quit. If the server crashes, it restarts it. If the app itself is force-quit, the server notices and exits too, so nothing is left running in the background.

Both light and dark mode follow your system setting.

Light mode

Light mode

Good to know

  • "RAM" is the physical footprint, the number Activity Monitor calls "Memory". It includes the compressed part, which is why the percentages can add up to more than 100%.
  • "On disk" is just the .app bundle. An app's documents, caches and other data live elsewhere in ~/Library and aren't counted.
  • The app is signed ad-hoc on your own machine by build.sh, so there's no Gatekeeper prompt. If you share the built .app with someone else, they'll need to right-click → Open the first time.
  • Logs go to ~/Library/Logs/Memwatch.log if something goes wrong.

License

MIT

About

A small Mac app that shows which apps are using your RAM, swap and disk

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages