Ask Your Question

SWAP is full

asked 2011-12-31 15:23:28 -0500

HoseinIT gravatar image

Hi I wanted to know which process is eating my SWAP ? how can I tell that?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-12-31 16:00:41 -0500

ryran gravatar image

updated 2012-01-01 09:03:45 -0500

Well... right off the bat.. check out the interactive command top: run it and then press z, then x, then use the < key (Shift-,) to sort by RES or VIRT. That should give you a big idea what's using the most RAM. Also, try h to see the help page, which will show you that you can also press F to pick the sort field, and can even sort by fields that aren't currently displayed, e.g. Swap. Check it out.

Similarly, you can check out ps with something like:

ps -eo pid,user,rss,comm --sort=-rss | head

... which will show you the top-9 RAM-using processes, which will of course be likely to illuminate what is forcing apps into swap.

Lastly, if you're running gnome like I am, gnome-system-monitor is great. Just go to the processes tab.

edit flag offensive delete link more

answered 2011-12-31 15:54:48 -0500

SoumyaC gravatar image

Run "top" command from the command line -

$ top

Press Capital "O" (without quotes) and then press small "p" (without quotes) and then hit "Enter" key. The process should now be sorted with the amount of Swap space usage.

edit flag offensive delete link more

Question Tools


Asked: 2011-12-31 15:23:28 -0500

Seen: 390 times

Last updated: Jan 01 '12