O'Reilly logo

PostgreSQL High Performance Cookbook by Dinesh Kumar, Chitij Chauhan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required