Operating System - HP-UX
1758868 Members
3464 Online
108876 Solutions
New Discussion юеВ

physmem : symbol not found.

 
SOLVED
Go to solution
Bill McNAMARA_1
Honored Contributor

physmem : symbol not found.

Hi,
one of my scripts is coming up with this:

echo physmem/D | adb64 -k /stand/vmunix /dev/mem | tail -1 | awk '{print $2/256 " Mbytes"}'
0 Mbytes

!

echo physmem/D | adb64 -k /stand/vmunix /dev/mem
symbol not found


echo phys_mem_pages/D | adb64 -k /stand/vmunix /dev/mem | tail -1 | awk '{print $2/256 " Mbytes"}'
1024 Mbytes

Also,
/usr/sam/lbin/getmem
48

48 whats??

# swapinfo -tm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
reserve - 301 -301
memory 320 130 190 41%
total 1344 431 913 32% - 0 -




It used to work long time ago!..

pereal - /home/trsh/.files # model
9000/800/A500-5X
pereal - /home/trsh/.files # uname -a
HP-UX pereal B.11.00 U 9000/800 1518780528 unlimited-user license

So, who can tell me how much RAM, I have in this box.

Thanks,
Bill
It works for me (tm)
18 REPLIES 18
Hai Nguyen_1
Honored Contributor

Re: physmem : symbol not found.

Bill,

It is weird but /usr/sam/lbin/getmem should return your RAM (in MB). That number is too low on your system.

This is "what" outputs on getmem on my system, HP-UX 11.0, 9000/800.

# what /usr/sam/lbin/getmem
/usr/sam/lbin/getmem:
HP System Administration Manager Version 3.5
built on date: 05/20/99 16:21:00


Hai
Pete Randall
Outstanding Contributor

Re: physmem : symbol not found.

Bill,

Here's what I use:

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 '{print $2*4/1024}')
echo $MYMEM

What's your OS version?

Pete

Pete
Pete Randall
Outstanding Contributor

Re: physmem : symbol not found.

Sorry, I can't read. Your OS version is 11.0 so you need to use phys_mem_pages rather than physmem.

Pete

Pete
Bill McNAMARA_1
Honored Contributor

Re: physmem : symbol not found.

# what /usr/sam/lbin/getmem
/usr/sam/lbin/getmem:
HP System Administration Manager Version 3.5
built on date: 05/20/99 16:21:00
--
QPK1100 B.11.00.54.7 Quality Pack for HP-UX 11.00, September 2001
XSWGR1100 B.11.00.47.08 General Release Patches, November 1999 (ACE)
XSWHWCR1100 B.11.00.54.6 HP-UX Hardware Enablement and Critical Patches, September 2001
--
# uname -a
HP-UX pereal B.11.00 U 9000/800 1518780528 unlimited-user license

It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: physmem : symbol not found.

CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.67 0.6% 0.0% 0.0% 99.4% 0.0% 0.0% 0.0% 0.0%
1 0.93 0.0% 0.0% 0.4% 99.6% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.80 0.2% 0.0% 0.2% 99.6% 0.0% 0.0% 0.0% 0.0%

Memory: 154640K (76980K) real, 156188K (107056K) virtual, 149288K free Page# 1/4
It works for me (tm)
Hai Nguyen_1
Honored Contributor

Re: physmem : symbol not found.

Bill,

Do you have glance on your box? If so, you can try:

# /opt/perf/bin/glance -m

and look for "Phys Mem:" at the end of the line next to the last. To quit glance, type "q".

Hai
Bill McNAMARA_1
Honored Contributor

Re: physmem : symbol not found.

I don't have glance installed, but if I did am nearly positive that it will give me yet another value...

Is there not an easy way? or at least one that works?!

Later,
Bill
It works for me (tm)
Pete Randall
Outstanding Contributor

Re: physmem : symbol not found.

Bill,

I really can't read, I guess. You did try phys_mem_pages. I tried both my method and yours on my 11.0 N-class and came up with 8192 Mbytes. /usr/sam/lbin/getmem, however, came up with 192.
So, I'm with you - 192 what?

What does dmesg say about memory?

Pete

Pete
Hai Nguyen_1
Honored Contributor

Re: physmem : symbol not found.

Bill,

How about this?

# dmesg | grep "Physical:"

The first value is your RAM in KB.

Hai