Operating System - HP-UX
1827294 Members
2899 Online
109960 Solutions
New Discussion

Re: Understanding HP-UX memory usage?

 
Rui Vilao
Regular Advisor

Understanding HP-UX memory usage?

Greetings,

I am trying to create a simple script to monitor the memory usage of our system

I can get the information about physical memory using the command:

# grep Physical /var/adm/syslog/syslog.log
Jan 11 18:12:42 prcc64 vmunix: Physical: 1310708 Kbytes, lockable: 1048500 K
bytes, available: 1083316 Kbytes

==> This means that I have:
Physical memory = 1280 Mbytes = 1310720 Kbytes

I can get the information about swap using the command:

# swapinfo -mt
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 14 1010 1% 0 - 1 /dev/vg00/lvol2
dev 1024 14 1010 1% 0 - 1 /dev/vg00/lvol11
reserve - 719 -719
total 2048 747 1301 36% - 0 -

==> This means that I have:
Total swap = 2048 Mbytes

Total Virtual Memory = RAM + swap = 1280 + 2048 = 3328 Mbytes
= 3407872 Kbytes

Now I want to get information about the memory in use. Using the top command:

Memory: 295504K (246596K) real, 552700K (492828K) virtual, 107516K free Page# 1
/5

From the man pages I can learn that "Memory Data" Includes virtual and real
memory in use (with the amount of memory considered "active" in parentheses) and
the amount of free memory.

What I can not understand is 1310720 Kbytes Physical memory and 747 Mb swap in
use (resorved+in use), how is it possible that I have only 295504K memory in use
and that only 107516K are free...

Thanks in advance for your help,

Kind Regards,

Rui.
"We should never stop learning"_________ rui.vilao@rocketmail.com
2 REPLIES 2
Anthony deRito
Respected Contributor

Re: Understanding HP-UX memory usage?

Rui, I think you would be better off keeping an eye on vmstat values especially the paging out statistics. HP-UX is a virtual memory operating system and by that definition, memory parameters will change often based on the kernel's built-in approach to managing memory. This is normal stuff. Sometimes it will reach high utilization points and low utilization points but this is not a problem. What you want to watch out for is paging out activity. If you see vhand running often, this is normal too. Its just doing its job of keeping the free list (free memory pages) at a decent level. However, when you start seeing the swapper daemon running, you may have a memory pressure problem that you need to look into. The swapper deamon will do its things based on minfree value. Read the mem_mgt.txt file in /usr/share/doc for more info.

Tony
James R. Ferguson
Acclaimed Contributor

Re: Understanding HP-UX memory usage?

Hi Rui:

The memory stats given by 'top' are confusing at best. Document #A3940339 ("9000: An explanation of top(1) memory values") is an oldie-but-goodie explaining them.

For a detailed discussion of memory, you can take a look at "HP-UX Memory Management (HP-UX 10.x)" in PDF or HTML format:
http://docs.hp.com/hpux/os/10.x/index.html

Since you indicate that you want to monitor memory usage in a script(s), I would suggest using 'vmstat' and 'sar'. For interactive monitoring, I'd use 'glance'.

Regards!

...JRF...