Operating System - HP-UX
1753882 Members
7748 Online
108809 Solutions
New Discussion юеВ

Re: How to find out used memory by Oracle

 
SOLVED
Go to solution
David_246
Trusted Contributor

Re: How to find out used memory by Oracle

Alright, let's not deny anymore that you're good.
But I keep anoying to tell you that :

t=0
for i in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | awk '{print $1}'`
do
t=`expr $t + $i`
print $t
done

Will give me a : 2651012 Kbytes
I would say that is a little to much difference when looking at :

swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 3072 161 2911 5% 0 - 1 /dev/vg00/lvol2
reserve - 582 -582
memory 745 263 482 35%
total 3817 1006 2811 26% - 0 -

But you already won! If you could clarify this it would help me in understanding, but the problem just got answered loud and clear!!!

Best Regs David
@yourservice
T G Manikandan
Honored Contributor

Re: How to find out used memory by Oracle

just check this attachment
Stefan Farrelly
Honored Contributor

Re: How to find out used memory by Oracle

The problem with the Kbytes total from ps is that it doesnt take into account shared code/memory. Remember, any executable loaded by hundreds of users will have shared instruction code (only user data will be different), which means a large memory saving, so its not very accurate - as you can see. You need something more sofisticated such as glance/gpm to work out individual process memory usage more accurately. The UNIX95 command is just a guide as to the largest memory hoggers - its not gospel.

Sometimes there are runaway processes, or operating system procesess which have gone mad and are hogging hundreds of MB of ram - this command is useful for spotting it, or you could use top, but not for adding up the total.
Im from Palmerston North, New Zealand, but somehow ended up in London...