How to find out what process is using swap

Asked by Mannex

I am wondering if there is a way to determine what process or processes are using swap. Any information will be greatly appreciated. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Mannex
Solved:
Last query:
Last reply:
Revision history for this message
clearkimura (clearkimura) said :
#1

@Mannex
Just adding a comment here...
I got interested in finding out your query so I did a brief search on the web.

After reading some message threads, I conclude that there is no simple/direct way to determine which process is using the swap. The best clue was lying in this thread: http://www.dcglug.org.uk/archive/2003/06/msg00050.html

And the closest solution I found was *this post, http://muzso.hu/2010/08/11/how-to-find-the-processes-using-the-most-swap-space-in-linux , based on answer at stackoverflow here http://stackoverflow.com/questions/479953/how-to-find-out-which-processes-are-swapping-in-linux

I have tried the command found in the post* and it listed currently running processes of swap usage from largest to lowest. But when I look at my System Monitor, my swap usage was only 96 KiB, which means the swap usage was actually showing "estimated" values [so-called foresight ability, eh?].

From what I have tried to understand, there is no way to determine which process is actively using swap memory.
Using above method, you can only "guess" swap usage of a process.

Hope this helps a bit! ;)

Revision history for this message
Mannex (russ-mannex) said :
#2

OK, I wrote a nice, long reply and my network trashed it. So, I'm done.