Thursday, May 10, 2012

How to Check Swap Space in Linux ??

Linux uses Swap Space to back its physical memory with an overflow area. In most cases the suggested amount is a disk space equal to the amount of physical memory you have installed.


Below, we'll check to see how the swap is defined and being used by your system.
From your root userid, enter the command "swapon -s". This will show your allocated swap disk or disks, if any. Your output should look like the following:



Enter the command "free". This will show both your memory and your swap usage. Your output should be similar to the following: