There are numerous ways to get information on the memory installed on Linux systems and view how much of that memory is being used. Some commands provide an overwhelming amount of detail, while others provide succinct, though not necessarily easy-to-digest, answers. In this post, we’ll look at some of the more useful tools for checking on memory and its usage.
Before we get into the details, however, let’s review a few details. Physical memory and virtual memory are not the same. The latter includes disk space that configured to be used as swap. Swap may include partitions set aside for this usage or files that are created to add to the available swap space when creating a new partition may not be practical. Some Linux commands provide information on both.
Swap expands memory by providing disk space that can be used to house inactive pages in memory that are moved to disk when physical memory fills up.
Read more at Network World