swap content?

Posted on 2012-08-21
Last Modified: 2012-08-21

Is there a way to see swap content? My swap is in use and I'm not sure which application uses it.

Thank you!
Question by:g0all
    LVL 17

    Expert Comment

    by:Sikhumbuzo Ntsada
    LVL 68

    Assisted Solution

    The SWAP column of "top" should tell you which process uses how much swap.

    Hit "O" then "p" and <Enter> to display (and sort by) this column.
    LVL 40

    Accepted Solution

    The swap area contains:

    - swapped pages

    When system is out of physical memory it will try to free memory and it write modified process pages to swap area temporarily till it is needed.

    - swapped processes

    When pages swapping is not efficient to free memory (since a lot of paging will cause load on the system and will then impact processes, etc), then the operating system will swap whole process out to swap area till it can schedule it to run again

    Basically you can not view the swap area content since it is managed by the OS but tools like top can till you about processes and swap area usage.
    LVL 1

    Author Closing Comment

    OK so there's no way to mount swap or see it's content?

    @wmp - welcome back!

    A mad admin closed my thread here:
    LVL 40

    Expert Comment

    No, there is no way
    LVL 68

    Expert Comment


    yes, I'm back.

    I updated my profile (i.e. removed the message saying that I'm offline),
    but indeed, who would come up with the idea of reading an EE profile?

    swap is maintained exclusively by the OS. No chance to view its contents.

    Looking forward to answering your upcoming AIX questions, and thx for  the points!


    LVL 1

    Author Comment

    Thx guys!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
    Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now