1832920 Members
2834 Online
110048 Solutions
New Discussion

Memory size 11.23 PA

 
Claus Hedegaard
Occasional Contributor

Memory size 11.23 PA

How can I get memory size on a hpux 11.23 running PA-risc ?
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: Memory size 11.23 PA

I use a little script:

HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi

MYMEM=$(echo "${MYSYMBOL}/D" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo $MYMEM

I believe that it will work on 11.23, though I haven't tried it.


Pete

Pete
Eknath
Trusted Contributor

Re: Memory size 11.23 PA

Hi Claus,

There are many ways: Dmesg/cstm/glance plus etc

Try any one of them

Cheers!!!
eknath
Claus Hedegaard
Occasional Contributor

Re: Memory size 11.23 PA

I use the same method, but it's not working on 11.23..
Claus Hedegaard
Occasional Contributor

Re: Memory size 11.23 PA

I would like to do it the script way. I am collecting data. Look in att. for HPUX and Linux
Dietmar Konermann
Honored Contributor

Re: Memory size 11.23 PA

Claus,

the problem is that both, phys_mem_pages and memory_installed_in_machine are long integers in 11.23. Your (old) adb command only scans the most significant word... which is typically 0 nowadays. :)

Using the new adb syntax, this should work:
# echo "memory_installed_in_machine/ld" | adb -n /stand/vmunix /dev/kmem

Workaround using the old adb style:
# echo "memory_installed_in_machine/DD" | adb /stand/vmunix /dev/kmem

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Claus Hedegaard
Occasional Contributor

Re: Memory size 11.23 PA

Thank's. That solved my problem..