How to do it...

Follow these steps to capture an interesting memory status from /proc/meminfo:

  1. Obtain basic memory states with the following command:
        grep -A3 MemTotal /proc/meminfo
  1. Execute this command to extract dirty memory buffers and pending writes:
        grep -A1 Dirty /proc/meminfo
  1. View the state of various memory caches with the following command:
        grep -A1 Active /proc/meminfo
  1. Show swap usage with the following command:
        grep Swap /proc/meminfo

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.