How to Check Swap Space in Linux
From your root userid, enter the command "swapon -s"., Enter the command "free"., In either of the above, look for the used space, compared to the total size.
Step-by-Step Guide
-
Step 1: From your root userid
This will show your allocated swap disk or disks, if any.
Your output should look like the following: -
Step 2: enter the command "swapon -s".
This will show both your memory and your swap usage.
Your output should be similar to the following: , If a large percentage of the swap space is used, then one of two actions may be warranted: you may want to either add an additional swap disk to increase the available swap space, or you may want to add additional physical memory to the system. -
Step 3: Enter the command "free".
-
Step 4: In either of the above
-
Step 5: look for the used space
-
Step 6: compared to the total size.
Detailed Guide
This will show your allocated swap disk or disks, if any.
Your output should look like the following:
This will show both your memory and your swap usage.
Your output should be similar to the following: , If a large percentage of the swap space is used, then one of two actions may be warranted: you may want to either add an additional swap disk to increase the available swap space, or you may want to add additional physical memory to the system.
About the Author
Beverly Ward
Experienced content creator specializing in hobbies guides and tutorials.
Rate This Guide
How helpful was this guide? Click to rate: