1756700 Members
3281 Online
108852 Solutions
New Discussion юеВ

Memory Cosumption

 
HutchAdmin
Occasional Advisor

Memory Cosumption

Hi,

Can any one tell me how can I extract the details of memory consumptions. I need the following details.

Total Memory
Memory Used
Unused Memory

Thanks
4 REPLIES 4
Mark Grant
Honored Contributor

Re: Memory Cosumption

Glance is a good tool for this if you have it.

Otherwise

"dmesg" shows how much physical RAM you've got (at least for a while). The only other way I have found of getting actual memory is with "c" and using "pstat_getstatic()" system call and multiplying the physical memory value by 4. I can attach an example program if you like.

"vmstat" is good for showing average memory and free memory (in pages).
Never preceed any demonstration with anything more predictive than "watch this"
RAC_1
Honored Contributor

Re: Memory Cosumption

grep -i physical /var/adm/syslog/syslog.log --> gives RAM in machine.

glance -m Gives details abt used, free mem.

vmstat 5 5 -- check free mem column. (free memory in pages. each page is 4096 kb)

There is no substitute to HARDWORK
G. Vrijhoeven
Honored Contributor

Re: Memory Cosumption

Hi,

Glance is the tool you need. It is free for 60 days. If you install it, you are able to view memory usage per proces.

Gideon
Pete Randall
Outstanding Contributor

Re: Memory Cosumption

For total memory, here's a little script I use:

HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi

MYMEM=$(echo "${MYSYMBOL}/D" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo $MYMEM


Pete



Pete