Operating System - HP-UX
1832895 Members
2580 Online
110048 Solutions
New Discussion

Command to know memory size on HP PA RISC

 
Sharish
Occasional Contributor

Command to know memory size on HP PA RISC

Hi,
Could you please let us know the size of memory on HP UX 11.11 i

I tried #cstm map
What option needs to be used to see the actual physical memory.

Many Thanks !

Regards
harish
11 REPLIES 11
Peter Godron
Honored Contributor

Re: Command to know memory size on HP PA RISC

Harish,
use SAM
or
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";'
or
one of the numerous solutions in previous threads.
spex
Honored Contributor

Re: Command to know memory size on HP PA RISC

Hi Harish,

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

PCS
Mustafa Gulercan
Respected Contributor

Re: Command to know memory size on HP PA RISC

hi;
just try dmesg
#dmesg

at the bottom of the output you can see memory info.

regards;
mustafa
spex
Honored Contributor

Re: Command to know memory size on HP PA RISC

'dmesg' is not a reliable method for reporting physical memory as more recent diagnostic messages will overwrite the ones from boot.
Pete Randall
Outstanding Contributor

Re: Command to know memory size on HP PA RISC

I use this little script:

#Note: for 11.23 RISC, use
MHZ=$(echo itick_per_tick/D \ # echo "itick_per_usec/d" \
| adb -k $HPUX /dev/kmem \ # | adb $HPUX /dev/kmem
| tail -1 \ #For Itanium, use machinfo
| awk '{print $2/10000}')
echo `hostname` has `ioscan -k |grep -n processor \
|wc -l` $MODEL $MHZ "Mhz processor(s)"


Pete

Pete
john D_3
Frequent Advisor

Re: Command to know memory size on HP PA RISC

Hi,

You can use glance. Once glance window popup, hit "m" and you will get memory info.

- do "grep -i phy /var/adm/syslog/syslog.log" (if it is not recycled).

- Check through stm.
stm --> hit "o"--> tab d -->select "class"--> go down and highlight memory and hit "o"--> tab t-->information --> run

You will get all the memory info.
Geoff Wild
Honored Contributor

Re: Command to know memory size on HP PA RISC

Download sysinfo (attached).

Output of memory looks like:

Memory Information
------------------
Basic Memory Description
Module Type: MEMORY
Total Configured Memory : 10240 MB
Page Size: 4096 Bytes
Memory interleaving is supported on this machine and is ON.
Memory Board Inventory
CAB/CELL: 0/0
DIMM A DIMM B DIMM C DIMM D
Slot Size (MB) Size (MB) Size (MB) Size (MB)
---- --------- --------- --------- ---------
0 512 512 512 512
1 512 512 512 512
2 512 512 512 512
3 1024 1024 1024 1024
Cell Total (MB): 10240
-------------------------------------------------
System Total (MB): 10240


I run from cron like so:

0 6 1 * * /usr/bin/SysInfo -a -b -o /usr/tmp/`hostname`.sysinfo >/tmp/sysinfo.cron 2>&1



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.
Sandman!
Honored Contributor

Re: Command to know memory size on HP PA RISC

# echo "scl q m;if;wait;il;done" | cstm
Hareesh Kumar
Advisor

Re: Command to know memory size on HP PA RISC

Use the command

/opt/ignite/bin/print_manifest | grep -i mem

Wil show the excat size of the memory in Mega bytes.

Try and revert.

Hareesh,
Yogeeraj_1
Honored Contributor

Re: Command to know memory size on HP PA RISC

hi harish,

you can also try this C program.

# vi phys_mem.c
static char SCCSid[] = "@(#)phys_mem 1.1";

#include

void main() {
struct pst_static stat_buf;
struct pst_dynamic dyn_buf;

pstat(PSTAT_STATIC,&stat_buf,sizeof(stat_buf),0,0);
pstat(PSTAT_DYNAMIC,&dyn_buf,sizeof(dyn_buf),0,0);

printf(" Physical memory = %ld MB\n",stat_buf.physical_memory/256);
printf(" Virtual memory = %ld MB\n",dyn_buf.psd_vm/256);
printf("Active Virtual memory = %ld MB\n",dyn_buf.psd_avm/256);
printf(" Real memory = %ld MB\n",dyn_buf.psd_rm/256);
printf(" Active Real memory = %ld MB\n",dyn_buf.psd_arm/256);
printf(" Free Memory = %ld MB\n",dyn_buf.psd_free/256);

return; }
~
~
~
~
"phys_mem.c" [New file] 19 lines, 649 characters
# cc -o phys_mem phys_mem.c
# ./phys_mem
Physical memory = 7168 MB
Virtual memory = 5944 MB
Active Virtual memory = 2769 MB
Real memory = 4457 MB
Active Real memory = 1616 MB
Free Memory = 758 MB
#

hope this helps!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Mridul Shrivastava
Honored Contributor

Re: Command to know memory size on HP PA RISC

Try the following command :

# echo "gop cstmpager cat;scl type mem;info;wait;il"|cstm > /tmp/mem.out

this will give u the details of memory modules.
Time has a wonderful way of weeding out the trivial