1752678 Members
5370 Online
108789 Solutions
New Discussion юеВ

Re: Memory usage

 
SOLVED
Go to solution
Aviad Twina
Advisor

Memory usage

Hi all,
What is best wat to measure memory usage in hpux 11.00?
Thanks,
Aviad
13 REPLIES 13
Bernhard Mueller
Honored Contributor

Re: Memory usage

Aviad,

top
will tell you how much "Free KB" you have.

vmstat 1 1
will list you the free memory pages (4KB)

to monitor for an hour you can use top or run
vmstat 1 3600

To go more into detail, you may consider (buying) Glance, there is 60-day trial version on one of the Application CDs, if you want to take a closer look at it

Regards,
Bernhard
Graham Cameron_1
Honored Contributor

Re: Memory usage

There are a number of tools.
Glance is the most user-friendly, just run it up and type "m".
There is also a number of other tools, best to read the man pages and try them.
vmstat
sar
swapinfo

Or if it's shared memory you're after, use ipcs -ma

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Umapathy S
Honored Contributor

Re: Memory usage

Aviad,
Glance is the best tool around here.

you can also use. man ps for more details.
UNIX95= ps -efo pid, vsz, comm

sar is useful as also the top.
HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
T G Manikandan
Honored Contributor

Re: Memory usage

#UNIX95= ps -e -o ruser,pid,vsz=Kbytes|more
Aviad Twina
Advisor

Re: Memory usage

Thank you all.
I'll take a deeper look in each one of your answers and i'll see what's the most suitable for my needs.

Aviad
Geoff Wild
Honored Contributor
Solution

Re: Memory usage

Try this one:

/usr/contrib/Q4/bin/kmeminfo

Output looks like:

# /usr/contrib/Q4/bin/kmeminfo
kmeminfo (3.11)
libp4 (5.17): Opening /stand/vmunix /dev/kmem

Loading symbols from /stand/vmunix

======================================================================
Date: Wed Nov 19 07:11:56 2003

Processing pfdat table (2505108 entries)...

----------------------------------------------------------------------
Physical memory usage summary (in pages):

Physmem = 2580480 Available physical memory:
Freemem = 613716 Free physical memory
Used = 1966764 Used physical memory:
System = 333474 by kernel:
Static = 75372 for text and static data
Dynamic = 0 for dynamic data
Bufcache = 258048 for file-system buffer cache
Eqmem = 54 for equiv. mapped page pool
SCmem = 0 for system critical page pool
User = 1144980 by user processes
Uarea = 6268 for thread uareas
Disowned = 63983 disowned pages

----------------------------------------------------------------------
Dynamic memory usage summary (in pages):

Dynamic = 0 Kernel dynamic data (sysmap):
MALLOC = 0 memory buckets:
bucket[ 5] = 0 size 32 bytes
bucket[ 6] = 0 size 64 bytes
bucket[ 7] = 0 size 128 bytes
bucket[ 8] = 0 size 256 bytes
bucket[ 9] = 0 size 512 bytes
bucket[10] = 0 size 1024 bytes
bucket[11] = 0 size 2048 bytes
bucket[12] = 0 size 4096 bytes
bucket[13] = 0 size 2 pages
bucket[14] = 0 size 3 pages
bucket[15] = 0 size 4 pages
bucket[16] = 0 size 5 pages
bucket[17] = 0 size 6 pages
bucket[18] = 0 size 7 pages
bucket[19] = 0 size 8 pages
bucket[20] = 0 size > 8 pages
Kalloc = 0 kalloc()
Eqalloc = 0 eqalloc()
Reserved = 0 Reserved pools



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Aviad Twina
Advisor

Re: Memory usage

Geoff,
Many thanks for your great answer!
Now after you submitted your answer I found the details I wanted to have form the begining.

Aviad
Aviad Twina
Advisor

Re: Memory usage

Geoff,
I need to give non root users the ability to run the kmeminfo.
Do you know if there is a patch/some other sulotion which enables this option?

Aviad
Brian Bergstrand
Honored Contributor

Re: Memory usage

Sombody posted some cool source code here to get memory detail. The good thing (in your case) is, it doesn't require root privalages. I'm attaching the source, if you need a binary let me know.

HTH.