How do you use vm_stat to read memory statistics on a Mac?
Last reviewed: 19 November 2026.
Run vm_stat in Terminal. It prints memory counters in pages, and the first line gives the page size (16384 bytes on Apple silicon, 4096 on Intel), so multiply a page count by the page size to get bytes. vm_stat 5 prints a new line every 5 seconds showing how each counter changed, which is how you see paging and swapping as it happens.
How do you run vm_stat?
- Print the totals. Run
vm_stat. The header readsMach Virtual Memory Statistics: (page size of 16384 bytes)on Apple silicon. - Convert pages to megabytes. Run
vm_stat | awk '/page size of/ {ps=$8} /Pages free/ {print $3*ps/1048576 " MB free"}'. Replace Pages free with another line to convert it. - Watch changes. Run
vm_stat 5. The first line after the banner is the total since startup; each later line shows the change in the last 5 seconds. - Stop after a few lines. Run
vm_stat -c 6 5to print six lines 5 seconds apart and exit.
What do the main lines mean?
| Line | Meaning |
|---|---|
| Pages free | Memory not in use at all. Often small, because macOS keeps spare memory busy as cache. |
| Pages active / inactive | Pages in use recently / not used recently. Inactive pages are the first to be reused. |
| Pages speculative | File data read ahead in case it is needed. |
| Pages wired down | Memory that cannot be paged out, used by the kernel and drivers. Activity Monitor's Wired Memory. |
| Pages purgeable | Memory apps marked as safe to discard. |
| File-backed / Anonymous pages | Pages holding file contents / pages holding app data with no file behind them. |
| Pages stored in compressor | Uncompressed size of the data the compressor holds. |
| Pages occupied by compressor | Memory the compressed data actually takes. Activity Monitor's Compressed. |
| Pageins / Pageouts | Pages read from and written to disk by the pager since startup. |
| Swapins / Swapouts | Compressed pages read back from and written out to the swap files. |
What should you look for?
In interval mode, watch the Swapouts and Pageouts columns. Zeros mean the Mac is not short of memory right now, however small Pages free looks. Steady non-zero values while the Mac feels slow mean memory is being pushed to disk; quit the apps using the most memory.
Comparing Pages stored in compressor with Pages occupied by compressor shows how well data compresses. The stored figure is often several times the occupied one.
How can Thrum help?
Thrum's Memory tab shows memory pressure, swap, and the eight processes using the most memory. An optional alert tells you when memory pressure turns critical.
Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.
Questions
Why don't vm_stat's numbers match Activity Monitor exactly?
Activity Monitor groups pages into its own categories, such as App Memory and Cached Files, from several counters. vm_stat shows the raw counters.
What is Translation faults?
The number of times the kernel's page-fault handler ran. It grows constantly and is rarely useful on its own.
Sources
- vm_stat(1) man page: run man vm_stat in Terminal
- Activity Monitor User Guide: View memory usage