1834328 Members
2804 Online
110066 Solutions
New Discussion

VMSTAT output on HPUX

 
panks
Regular Advisor

VMSTAT output on HPUX

Hi,

Can anyone tell me that the free memory parameter in vmstat output is in KB, Bytes or ??. I want to use that in script I consider it as KB but then I am getting the wrong value.
Can any one tell me
here is the output:
procs memory page faults cpu
r b w avm free re at pi po fr de sr in sy cs us sy id
1 2 0 721674 5789 62 5 28 3 17 0 118 3404 12503 312 2 1 97
1 2 0 721674 6987 95 21 4 0 0 0 0 1099 4246 147 0 0 100


The value under Memory free tab, more interested in 6987.
10 REPLIES 10
Jaime Bolanos Rojas.
Honored Contributor

Re: VMSTAT output on HPUX

Panks, if I remember right, it gives you the output in pages, and by default again if I remember right a page is equivalente to 4K.

Regards,

Jaime.
Work hard when the need comes out.
panks
Regular Advisor

Re: VMSTAT output on HPUX

But why available memory parameter is getting changed. It shold be constant to the total physical memory. In short I want to know how much memory is free out of total physical memory.
Also even if I consider 4K page still the value doesn't match to swapinfo output showing the free memory.
Jaime Bolanos Rojas.
Honored Contributor

Re: VMSTAT output on HPUX

Hi panks, I am not certain yet of what you are trying to accomplish, but vmstat output is not going to be fixed, is going to change all the time:

"Information about the usage of virtual and real memory. Virtual pages are considered active if they belong to processes that are running or have run in the last 20 seconds.

avm
Active virtual pages

free
Size of the free list"

On the other side, swapinfo only talks about swap and pseudo-swap space, it never talks about free physical memory on a system.

You might want to refer to top, or glance to see the amount of free memory on a system.

Regards,

Jaime.

Work hard when the need comes out.
panks
Regular Advisor

Re: VMSTAT output on HPUX

No that is not true, swapinfo gives you the details of your physical memory also.
There is tab called memory and under that it gives you the details of used and free memory. I cross checked with the output from machinfo and found the same as of swapinfo value of total phy memory.

Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 343900 3850404 8% 0 - 1 /dev/vg00/lvol2
dev 8388608 347252 8041356 4% 0 - 1 /dev/vg00/lvol12
dev 8290304 0 8290304 0% 0 - 2 /dev/vg00/lvol18
reserve - 3240500 -3240500
memory 4182536 3365052 817484 80%
Dennis Handly
Acclaimed Contributor

Re: VMSTAT output on HPUX

>swapinfo gives you the details of your physical memory also.

You might want to use "swapinfo -tam" since there are too many digits in your numbers. :-)
Jaime Bolanos Rojas.
Honored Contributor

Re: VMSTAT output on HPUX

I am sorry Panks, I do not mean to contradict you but swapinfo does not talk at all about physical memory, it only talks about swap, it´s a misconception by a lot of people to think that the memory line in swapinfo refers to physical memory.

The memory line, indicates how much pseudo-swap has been reserved.

If you would like to learn more about memory, I recommend you this guide:

ftp://eh:spear9@hprc.external.hp.com/memory.htm

Please remember to add points to the people that is helping you out.

Regards,

Jaime.
Work hard when the need comes out.
Steven E. Protter
Exalted Contributor

Re: VMSTAT output on HPUX

Shalom,

One thing I can see is your system is paging, though not at a dangerously high pace.

Paging processes from memory to disk and back again, slows down overall performance and could be an indication of memory pressure.

Consider monitoring over time:
http://www.hpux.ws/?p=6

The answers to consistent paging are to increase memory to decrease demand for memory.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
panks
Regular Advisor

Re: VMSTAT output on HPUX

ok Jaime, if you are saying that swapinfo dont show the actual physical memory and its usage then what command I can use to get the physical memory and its current usage. I dont want to use any command like TOP as I am writing a script and the data given by top or glance is very complicated.

Thanks
Don Morris_1
Honored Contributor

Re: VMSTAT output on HPUX

Write your own using pstat interfaces then. Sample attached, modify as you wish.
Don Morris_1
Honored Contributor

Re: VMSTAT output on HPUX

Oh... and keep in mind, just the Total/Free for physical memory is typically not all that interesting on HP-UX. The kernel caches for performance aggressively on many levels (kernel dynamic memory, file caches, buffer caches, etc.). These caches typically stick around until free memory drops to around 1% or so [i.e. when there's memory pressure -- though that can have different meanings when products like PRM come into play and sub-system level accounting is used].

To find _where_ all the memory is being used takes a lot more diving through pstat if you want to do it yourself... or using Glance (which did it for you) or unsupported tools meant only for support which leak out from time to time. If free memory is enough, that's great -- but you might want to take a step back and let us know what you're really trying to do to see if that's meaningful.