Operating System - HP-UX
1834264 Members
75488 Online
110066 Solutions
New Discussion

Re: How to see real memory

 
hongyu xing
Occasional Contributor

How to see real memory

we can see real memory in sam
but i want to know what command can see the same message as it in sam.
thanks a lot
8 REPLIES 8
Andreas D. Skjervold
Honored Contributor

Re: How to see real memory

Hi
top might do the trick; gives real, virtual and free memory with "active" memory in paranteses ()

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Frank Li
Trusted Contributor

Re: How to see real memory

Hi, you can use the C program to get it .

It's also downloaded from the ITRC

Frank.
Hi Friend
Shahul
Esteemed Contributor

Re: How to see real memory

Hi

Use this command

#swapinfo -M

This will list the real memory.

Shahul
Mark van Hassel
Respected Contributor

Re: How to see real memory

Hi,

I wouldn't use swapinfo -M because this gives info regarding paging. The best tool is the C program (which we use as well). Also you could use stm ot, on HPUX 11 the command crashconf gives the total amount of pages on the system, which are by default 4KB.
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Mladen Despic
Honored Contributor

Re: How to see real memory

Hi,

In SAM, when you select "Performance Monitors" and then "System Properties", you will see different information about the system, including the amount of physical memory. I think SAM uses a C program internally to generate such information.

Besides using a C program, another way to obtain such information from the command line is Glance Adviser.
You can just run:

glance -adviser_only -syntax

where is a file you have prepared.
Your adviser syntax file could have a single line, like:

PRINT gbl_mem_phys

or if you want to get just a bit more fancy, try this:

PRINT ""
PRINT gbl_statdate, " ", gbl_stattime
PRINT "-------------------------------"
PRINT "System Memory: ", gbl_mem_sys
PRINT "Buffer Cache: ", gbl_mem_cache
PRINT "User Memory: ", gbl_mem_user
PRINT "Free Memory: ", gbl_mem_free
PRINT "-------------------------------"
PRINT "Total Physical Memory: ", gbl_mem_phys

If you save this as "adviser.syntax" in your home directory, you can also run:

glance -adviser_only -iterations 1

There are hundreds of glance metrics that you can specify in your adviser syntax file. If you try it, you may like it (assuming, of course, that you have Glance :)

Regards ... Mladen
Alex_17
Frequent Advisor

Re: How to see real memory

You can also use the "print_manifest" command. It also gives a lot of aditional information.

Alex.
Andrew Kingsbury
New Member

Re: How to see real memory

HP-UX 10.x:
As "root", type:

echo vx_memsize/D | adb -k /stand/vmunix dev/kmem

This will give you the memory size in MB directly:

vx_memsize: 128



HP-UX 11.x:
As "root", type:

echo memory_installed_in_machine/D | adb -k /stand/vmunix /dev/kmem

memory_installed_in_machine: 32768

Divide the resulting number by 256 to get the result in MB,
e.g.: 32768/256=128
"I swear by Unix. Sometimes I swear AT it."
Philip P. Hartl
Valued Contributor

Re: How to see real memory

You can also try
/usr/sbin/dmesg | grep Physical
This extracts the memory as determined at boot time.
Don't take life so seriously; nobody gets out alive.