What is the OS X equivalent to the free command to show buffer and cache memory?

The free command displays the buffer and cache memory on Linux. What is the command to show the equivalent information for an OS X machine?


Solution 1:

vm_stat may just show you what you need. As per the man page:

vm_stat -- show Mach virtual memory statistics

It can show you the following:

  • Pages free
  • Pages active
  • Pages inactive
  • Pages speculative
  • Pages throttled
  • Pages wired down
  • Pages purgeable
  • "Translation faults"
  • Pages copy-on-write
  • Pages zero filled
  • Pages reactivated
  • Pages purged
  • File-backed pages
  • Anonymous pages
  • Pages stored in compressor
  • Pages occupied by compressor
  • Decompressions
  • Compressions
  • Pageins
  • Pageouts
  • Swapins
  • Swapouts