1826004 Members
3217 Online
109690 Solutions
New Discussion

Monitor Memory Usage

 
Brent W. Moll
Advisor

Monitor Memory Usage

I hve a K460 with 4GB of installed memory. My users are telling me that they have to shut down various databases to conserve memory.

This server is at the end of it's lifetime and will be upgraded soon, however I would like to know how I can use monitoring tools, (Glance) to tell me how much memory is being used by specific processes.

Thank you ! :)
8 REPLIES 8
Paddy_1
Valued Contributor

Re: Monitor Memory Usage

Start glance and type "M" which will prompt you the process id that you want to monitor.

Start glance and type "?" to see more help about the usage of the product.
The sufficiency of my merit is to know that my merit is NOT sufficient
blal
Frequent Advisor

Re: Monitor Memory Usage


Hi

you can use the following tools .

top
glance -m
perfview

see memory management white paper from
http://docs/hp.com for details .


Live and let live.
Hoefnix
Honored Contributor

Re: Monitor Memory Usage

You can also use ps like:
ps -lf -u | awk 'BEGIN {total=0} { total+=$10 } END {printf "Total=%u\n",total}'
Total is in bytes.

If you have oracle processes running under user oracle, just fill in the user oracle in the above command line.

Also ipcs will give you an idea of the total amount of shared memory is used by u user id.
ipcs -am | grep | awk 'BEGIN {total=0} { total+=$10 } END {printf "Total=%u\n",total}'
RAC_1
Honored Contributor

Re: Monitor Memory Usage

glance -m
echo "freemem/D" | adb -k /stand/vmunix
vmstat 5 5
(Look for free pages column)
glance -M
(Check process you want.)
There is no substitute to HARDWORK
Hoefnix
Honored Contributor

Re: Monitor Memory Usage

sorry ps -lf -u user will NOT give the size in byte, but the physical pages. Physical page size is defined by _SC_PAGE_SIZE in the header file
command:
getconf _SC_PAGE_SIZE
4096

Will return the value, default will be 4k so the the Total*4K will give the total in bytes
Bill Hassell
Honored Contributor

Re: Monitor Memory Usage

To sort the processes by amount of memory being used, just type this:

UNIX95= ps -e -o vsz,ruser,pid,args | sort -rn | head -20

HOWEVER, it very likely that the databases are NOT running out of local memory (because swapspace takes care of this - see the command swapinfo -tm), but are 32bit programs that are badly fragmenting the relatively small 32bit shared memory area. To see the g\fragmentation (and all the other stuff in shared memory, get a copy of shminfo from ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/programs/

The solution is to use memory windows. Also look at the white papers on memory and process management found in /usr/share/doc.


Bill Hassell, sysadmin
MANOJ SRIVASTAVA
Honored Contributor

Re: Monitor Memory Usage

Brent

If you ahve a C compiler you can run a small program which I have got from the firums itself , I ahve attached the same . The output would be as :

Memory Stat total used avail %used
physical 4096.0 3234.0 862.0 79%
active virtual 1128.8 876.9 251.9 78%
active real 1169.8 732.3 437.5 63%
memory swap 3141.0 1016.0 2125.0 32%
device swap 8048.0 2133.9 5914.1 27%

Please compile using cc file name and you are good to go , this will give the sanpshot at that moment.

Manoj Srivastava
Jean-Luc Oudart
Honored Contributor

Re: Monitor Memory Usage

From a previous post it seems yhe database is oracle.
CHeck the memory allocation ipcs -bm | grep oracle

Is this a test server ?
You could probably reduce bufferpool.
You can tune the sahred pool too.
cf attachment

Regards,
Jean-Luc
fiat lux