1834646 Members
2459 Online
110069 Solutions
New Discussion

Re: Used Memory

 
SOLVED
Go to solution
Edwin Ruiz_2
Super Advisor

Used Memory

Hi to all

How can i know the used memory using commands on HP-UX? i have Glance but i would like to use the command line.

Thanks
5 REPLIES 5
Sundar_7
Honored Contributor
Solution

Re: Used Memory

# echo "freemem/D" | adb -k /stand/vmunix /dev/kmem

This will tell you the amount of free memory in pages (4 KB by default),

# echo "phys_mem_pages/D" | adb -k /stand/vmunix /dev/kmem

This will tell you the total physical memory installed in the system in pages (4KB by default).

Used Memory = Total - free memory
Learn What to do ,How to do and more importantly When to do ?
Edwin Ruiz_2
Super Advisor

Re: Used Memory

thakns Sundar!!!
Sridhar Bhaskarla
Honored Contributor

Re: Used Memory

Hi Edwin,

Get the total physical memory installed on the box. There are quite a few ways.. 'grep Physical /var/adm/syslog/syslog.log' 'echo "phys_mem_pages/D" |adb -k /stand/vmunix /dev/mem' etc.,

Run 'vmstat 5 2' and note the 'free' column and multiply with 4 and you will get free memory in KB.

'Total Memory - Free Memory' will give you used memory.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Used Memory

Hi Edwin,

Sorry about my post. I didn't really mean to answer an already answered question. My brower waited for quite sometime before it contacted itrc.

You can ignore the message.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Edwin Ruiz_2
Super Advisor

Re: Used Memory

thanks Sridhar