gander / on macOS
htop works on macOS. What trips people up is not htop — it is that several numbers they expect on Linux have no macOS equivalent, and a viewer that shows them anyway is guessing.
This page is the honest inventory: what macOS will tell a process viewer, what it will not, and what gander does about each gap. It applies to htop and gander alike, because they read the same interfaces.
panels layout. The memory figure is the macOS one, explained below.Almost everything in an htop process table comes from three places, and all three work on macOS:
| Figure | Source |
|---|---|
| Process list | proc_listallpids plus PROC_PIDTASKALLINFO |
| Command line | sysctl(KERN_PROCARGS2) |
| Executable path | proc_pidpath |
| Working directory | proc_pidinfo(PROC_PIDVNODEPATHINFO) |
| Threads | PROC_PIDLISTTHREADS + PROC_PIDTHREADINFO |
| Memory totals, swap | host_statistics64, hw.memsize, sysctl(vm.swapusage) |
| Per-core CPU | host_processor_info |
| Network throughput | sysctl(NET_RT_IFLIST2) |
So the common claim that htop "does not really work on macOS" is wrong. It works. The interesting part is the second table.
Every row here is a Linux-only mechanism with no Darwin counterpart. The question is what a viewer does about it.
| gander on macOS | |
|---|---|
| PSS / EPSS per process | column absent, not - |
| PSI pressure meters | meter says n/a here |
| Zram / Zswap / HugePages | meter says n/a here |
| Container / cgroup identity | no cgroup concept; column gated out |
| CPU delay accounting | column gated out |
I/O priority (i) | no ioprio_set; the panel says so |
| GPU columns | needs IOKit; gated out |
| Host-wide disk throughput | meter says n/a here |
| CPU affinity editing | hint only |
The distinction that matters is between a column that is absent and a column that renders -. A - in a column reads as "this process had no such value right now"; an absent column reads as "this system does not have the concept". gander gates the columns out of the setup screen entirely on macOS, and leaves the meters in place saying n/a here — because a config file written on Linux still has to load on a Mac, and a meter that disappears would be a broken config rather than an honest one.
macOS memory accounting is not Linux's, and a viewer that maps one onto the other is wrong by a visible margin. vm_statistics64 exposes two overlapping families of counters — by usage (active, inactive, wire, compressor, free, speculative) and by backing store (internal, external) — and summing across families double-counts. gander builds the figure from the backing-store family plus the two page categories it does not cover:
used = (internal - purgeable) + wired + compressed
available = total - used
That is the same number htop prints, derived the same way, and the same number Activity Monitor and top report. So gander and htop agree with each other on a Mac. What neither agrees with is a naive total - free from vm_stat, which is the comparison that makes either tool look wrong.
The other thing worth knowing: inactive and speculative count as cache, not as used. A machine that has been up for a week is not out of memory because inactive is large — that is reclaimable.
Not in the figures — in the screen. htop's panels for details are full-screen modes: e for environment, l for open files, s for system calls each replace the process list, and coming back means finding your place again. gander keeps the selected process's command line, state, memory and runtime in a column beside the table, so the list stays where it was.
The keybindings are the same, the htoprc import is the same, and L gives you htop's layout if that is what you came for. See vs htop for the keys that differ.
brew install pandasir/tap/gander
# or, with a Rust toolchain
cargo install gander-bin
There are also prebuilt archives for both Apple Silicon and Intel in Releases. Requires macOS on Apple Silicon or Intel; no ncurses headers, no Xcode project.
Live testing on macOS reads the real process table, so the test suite may need to run outside a restricted sandbox. The backend comparison for all three platforms is in docs/PORTABILITY.md.