Tracking historical memory usage

In this recipe, we are going to see how to analyze the memory load for a previous day in the week.

Getting ready

The commands used in this recipe have been performed on a CentOS Linux machine. The command output may vary in other Linux and Unix-based operating systems.

How to do it...

When it comes to analyzing memory statistics, we need to check for both paging statistics as well as swapping statistics.

We can use the sar command in conjunction with the -B switch to report on paging statistics, along with the -f switch to report on statistics for different days of the month. As mentioned in the previous recipe, the files that the sar command uses to report statistics for different days of the month are located in ...

Get PostgreSQL High Performance Cookbook 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.