System Administration
Showing results for 
Search instead for 
Do you mean 

How to view the memory size (RAM size)

SOLVED
Go to Solution
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.
1 ACCEPTED SOLUTION
Respected Contributor Respected Contributor

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
15 REPLIES
Respected Contributor Respected Contributor

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
Occasional Visitor

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
Honored Contributor 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.
Esteemed Contributor 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
Respected Contributor 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

Attached are some useful docs..
For HP Online Case Logging-->http://support.openview.hp.com/
Acclaimed Contributor Acclaimed Contributor

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

Hi:

If you are running an Itanium server, use :

# machinfo

Regards!

...JRF...
Honored Contributor Honored Contributor

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

the following command also can be used:

dmesg | grep -E -i 'memory|physical'
Honored Contributor 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."
Honored Contributor 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.
Trusted Contributor 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

Honored Contributor 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
Esteemed Contributor 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
Occasional Contributor

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

Hi,

 

# glance -m
sh: glance:  not found.

 

Not working.

 

Regards,

 

Lokman

Acclaimed Contributor 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.)

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 )}'