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.

6 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: From your root userid

    This will show your allocated swap disk or disks, if any.

    Your output should look like the following:
  2. 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.
  3. Step 3: Enter the command "free".

  4. Step 4: In either of the above

  5. Step 5: look for the used space

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

B

Beverly Ward

Experienced content creator specializing in hobbies guides and tutorials.

33 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: