Operating System - HP-UX
1819801 Members
3067 Online
109607 Solutions
New Discussion юеВ

How to view the memory size (RAM size)

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to view the memory size (RAM size)

Hi

In HP-UX, how to view the memory size.

In linux i am using "# free -m". like this
what is the commnad used in HP-UX.
15 REPLIES 15
Frank de Vries
Respected Contributor
Solution

Re: How to view the memory size (RAM size)

swapinfo -m

or

top (12th line)

Memory: 826688K (466512K) real, 3096440K (2098204K) virtual, 176636K free Page# 1/17

or
vmstat 5 55 (5th collumn)


Look before you leap
Sajid Iqubal
New Member

Re: How to view the memory size (RAM size)

Hi Senthil,


check following commands...


# dmesg |grep -i Physical

#print_manifest |grep -i memory

Check with sam also as,

sam -> performance monitor -> system properties -> memory
T G Manikandan
Honored Contributor

Re: How to view the memory size (RAM size)

# echo "selclass qualifier memory;info;wait;infolog"|cstm

this will give out the memory arrangment and slots in the board.
Prashanth Waugh
Esteemed Contributor

Re: How to view the memory size (RAM size)

Hi,

you can check using glance
#glance -m

Reagrds
Prashant
For success, attitude is equally as important as ability
Sivakumar MJ._1
Respected Contributor

Re: How to view the memory size (RAM size)

Senthil,

Use #print_manifest

(/opt/ignite/bin/print_manifest)

Check this link as well http://docs.hp.com/en/B2355-90772/ch05s06.html [Admin: This link is no longer valid]

Attached are some useful docs..

James R. Ferguson
Acclaimed Contributor

Re: How to view the memory size (RAM size)

Hi:

If you are running an Itanium server, use :

# machinfo

Regards!

...JRF...
Hakki Aydin Ucar
Honored Contributor

Re: How to view the memory size (RAM size)

the following command also can be used:

dmesg | grep -E -i 'memory|physical'
Avinash20
Honored Contributor

Re: How to view the memory size (RAM size)

If lot of diagnostic messages are being logged to system buffer, the dmesg wont be able to show your the Physical memory

Better way as suggest above is print_manifest or machinfo from the OS.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Ganesan R
Honored Contributor

Re: How to view the memory size (RAM size)

Hi,

Many ways you can find the physical memory details. Fews are,

# echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm | grep 'Total Configured'
# echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm | awk '/Total Configured/{print $5}'|head -1
# /opt/ignite/bin/print_manifest |grep i memory
# dmesg |grep -i physical
# grep Phys /var/adm/syslog/syslog.log
Best wishes,

Ganesh.
Md. Farhan A Azam
Trusted Contributor

Re: How to view the memory size (RAM size)

Hi,

1). Through SAM
#sam> Press "Return" to continue...> Performance Monitors> System Properties> Memory.

2). You can get it through kmeminfo (if kmeminfo is installed).
#cd /tmp
#./kmeminfo


Thnx...Farhan

Suraj K Sankari
Honored Contributor

Re: How to view the memory size (RAM size)

hi,
I always do this below command to check my physical memory.

# dmesg |grep -i physical
or
machinfo
or
nickel

Suraj
Arturo Galbiati
Esteemed Contributor

Re: How to view the memory size (RAM size)

Hi,
# To get RAM size in KB
perl -e 'local($PSTAT,$PSTAT_STATIC,$mem_info,$PSTAT_STRUCT)=(239,2,"\0"x120,"LI4L");
syscall($PSTAT,$PSTAT_STATIC,$mem_info,length($mem_info),1,0);
print "RAM=".int((unpack($PSTAT_STRUCT,$mem_info))[4]*((unpack($PSTAT_STRUCT,$mem_info))[5])/(1024*1024))."\n";'

HTH,
Art
Lokman_csl
Occasional Contributor

Re: How to view the memory size (RAM size)

Hi,

 

# glance -m
sh: glance:  not found.

 

Not working.

 

Regards,

 

Lokman

Dennis Handly
Acclaimed Contributor

Re: How to view the memory size (RAM size)

>sh: glance:  not found.

 

You purchase glance separately.

(Try another of the above suggestions, except for dmesg.)

BBphil
Occasional Visitor

Re: How to view the memory size (RAM size)

I manage a number of legacy HP-UX systems from HP-UX 9 to HP-UX 11 and not all have all toos/commands.

Thus I prefer something which works on all flavors.

dmesg does not give the answer if the system was up a long time and the buffer does not hold the boot information anymore. Kernel tools are different on different versions and support tools are often not installed.

Currently I use a combination of dmesg and syslog lookup and check for the Physical memory lines, which gives me a result in most cases.

 

   [[ -d /usr/adm        ]] && SYSLOGdir=/usr/adm
   [[ -d /var/adm/syslog ]] && SYSLOGdir=/var/adm/syslog
         dmesg | cat - $SYSLOGdir/*syslog* \
               | grep Physical: \
               | sed -e 's/.*ical: *//' -e 's/ .*//' \
               | sort -u | awk '{printf( "%d MB\n", $0/1024 )}'