SUMMARY: what's chewing up the swap space?

From: ert weerr <>
Date: Wed Jan 12 2005 - 17:47:48 EST
>Is that possible to check what applications are 
>sitting in the swap and not releasing the used 
>swap area? 
>We have an old box what we shouldn't reboot, but a
>badly written application always chewing up the free 
>swap space.
>We need to identify this application and kill 
>it if it's possible.

I received a lot of useful solutions for my original
Thanks to everyone who spent time to reply for my


You can do /usr/ucb/ps -alxww and then check out the 
processes that have a large SZ.


ps -ef or prstat  will show the amount of memory (real

& virtual) used by a process.  if the memory used by a

process grows other time, it is  your memory-leaker.


ps -elf shows a SZ column which is the size of the 
process in pages. 
Multiple that by the output of page size to find the 
total size of the processes in bytes.  pmap -S <pid> 
will show the swap reservation of a process if you're 
running under Solaris 9.


prstat -s size

also check for files in (or applications writing logs
into) /tmp


"ps -el" should show a large SZ for the offending 
process (remember SZ is in pages, so its a lot bigger 
than it looks).  Solaris 8 has "ps -eyl" which shows
in kilobytes.  Once you find a large process, you can 
use tools in /usr/proc/bin to learn more about it,
or just watch it for a while to see if it grows.

Also run lsof on /tmp.  It could be some process is 
writing big files there.  Since /tmp is a memory file 
system, that can chew up a ton of swap space.


"lsof" can be used to view open files in tmp/swap with
a link count of 0 (zero).



Do you Yahoo!? 
All your favorites on one personal page  Try My Yahoo! 
sunmanagers mailing list
Received on Wed Jan 12 17:48:16 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:42 EST