Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick way to identify process(es) eating up swap

Status
Not open for further replies.

mkinney

Technical User
Nov 18, 2003
3
0
0
US
Hello,

I have a system with swap at 100%. I'm looking for a quick way to identify if it's a runaway process(es) killing swap. Another way of putting it is that I'm trying to determine root cause for the swap utilized at 100%

Thanks!
 
FYI, it's a Sun 420r running Solaris 5.7
 
Keep in mind that on Solaris the directories [tt]/var/run[/tt] and [tt]/tmp[/tt] use swap, so you can look for some very large files in these directories. A big file in [tt]/tmp[/tt] could be your culpret.

If that's not the problem, you can use the command "[tt]prstat -s size[/tt]" to list processes sorted by memory used, or "[tt]prstat -s rss[/tt]" to list the processes by resident memory size.

Also, when you have a suspect process, the command [tt]pmap[/tt] can be used to get details of a processes memory usuage.

Hepe this helps.

 
It's probably worth noting that /tmp does not have to be swap. Having /tmp be a TMPFS file system is worthwhile for applicatoins that need faster access to those tmp files (such as DBMS systems), but is not a must. I've seen more than one admin with a skewed TMPFS ratio bring his box to its knees.

Cheers,

Keith
 
Keith is right, if you don't need frequent access to /tmp, just change the type of FS in vfstab for /tmp (or even remove it, if your / is big enough).
On my servers, only the Checkpoint Database use /tmpfs, anyway they all got 2 Go of RAM !!! ;o)
See you
 
Not sure if Solaris 2.7 has prstat, if not you can try downloading top from sunfreeware.com. It has information on all the processes on a server, just like prstat, and you can sort by swap.

-BP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top