1753524 Members
4973 Online
108795 Solutions
New Discussion юеВ

/usr/sam/lbin/getmem

 
SOLVED
Go to solution
Shahul
Esteemed Contributor

/usr/sam/lbin/getmem


Hi

I have many boxes with 11.0 and 11.11. I am trying /usr/sam/lbin/getmem command to get the physical memory. For non root users it gives nothing and for root users it gives wrong answer. I observed that this command is giving right answer in a B class workstation where memory is less than 512 MB. Anyone knows about this command? Why getmem misleading me? Is it a known issue?

TIA
Shahul
5 REPLIES 5
Alex Glennie
Honored Contributor

Re: /usr/sam/lbin/getmem

take a look at KBRC00010402
getmem doesn't report more the 512mb RAM
dmesg | grep P
or consider using glance ?
Marco Santerre
Honored Contributor
Solution

Re: /usr/sam/lbin/getmem

Hi Shahul

Go here and I think you'll find the answer to what you're looking for

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063198307

it is an obsolete command
Cooperation is doing with a smile what you have to do anyhow.
Pete Randall
Outstanding Contributor

Re: /usr/sam/lbin/getmem

Shahul,

I use the following script for memory reporting:

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



Pete

Pete
Rory R Hammond
Trusted Contributor

Re: /usr/sam/lbin/getmem


Pete your suggestion needs to read KMEM which is something users cannot do. it puts the problem back to
glance -m
There are a 100 ways to do things and 97 of them are right
Norman_21
Honored Contributor

Re: /usr/sam/lbin/getmem

Hi,
You can use this:

#/usr/sbin/dmesg |grep -i Physical
look for the output line beginning:
Physical: xxx Kbytes
Divide it by 1024 to the value in MBs.

Thanks.
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003