Solved

LINUX: What processes are using SWAP?

Posted on 2013-01-02
2
676 Views
Last Modified: 2013-01-02
Hi,

How can I see what processes are resident in swap? I'd like to see what application is using my swap.

Thank you.
0
Comment
Question by:g0all
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 38736237
Hi, and Happy New Year!

You could try

ps -e -o rss,vsize,pid,cmd

This will display, besides PID and command, the resident set sizes (main memory) and the total virtual memory sizes of your processes.

The difference between the resident size and total size is the swap space used by that process.

One-liner to calculate that difference (sorted ascending by swap size):

ps -e -o rss,vsize,pid,cmd |awk '{SW=$2-$1; print SW, $0}' |sort -k1n

If "cmd" prints the full command line try "comm" instead to see just the executable's name.
0
 
LVL 1

Author Comment

by:g0all
ID: 38736260
Happy New Year wmp!

Thank you for your answer! I will check this and revert back later.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

752 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