1752476 Members
6132 Online
108788 Solutions
New Discussion юеВ

ADB issue on 11iv2

 
SOLVED
Go to solution
Geoff Wild
Honored Contributor

ADB issue on 11iv2

Comparing 2 RP4440 HP-UX 11.23 systems.Both have:

HPUX11i-OE-Ent B.11.23.0505 HP-UX Enterprise Operating Environment Component

I have a script called hpmem (attached).

On one system, works perfect...

On other, I get an adb error - but it still works:

# hpmem
HP-UX pc1104 B.11.23 U 9000/800 3394666127 unlimited-user license
CPU Count: 4
CPU Speed: 999 MHz
CPU HW Support: 64-bit
Kernel Support: 64-bit
adb: warning: No memory file specified ...
adb: warning: Using 'core'.
adb: warning: Object file not SOM ...
adb: warning: Shared library symbols could not be read.
RAM Size: 6142 MB
bufpages: 963 MB
maxuprc: 3686
maxvgs: 30
maxfiles: 2048
max_thread_proc:
nfile: 63488
nproc: 4096
ninode: 34816
shmmax: 1073741824
shmmni: 512
dbc_max_pct: 18

With set -x

Kernel Support: 64-bit
+ GetKernelSymbol memory_installed_in_machine
+ echo memory_installed_in_machine/D
+ adb /stand/vmunix /dev/kmem
+ read junk junk2 kval
+ tr \012
+ + uname -r
+ cut -d. -f3
ver=23
+ let ver > 22
+ + /usr/sbin/kcpath -x
kernel=/stand/current/vmunix
+ + echo phys_mem_pages/A
+ adb /stand/current/vmunix /dev/kmem
+ awk {print $2}
+ tail +2
hexval=0x17fe00
+ + echo 0x17fe00=D
+ adb
adb: warning: No memory file specified ...
adb: warning: Using 'core'.
adb: warning: Object file not SOM ...
adb: warning: Shared library symbols could not be read.
REAL_MEM= 1572352
+ + expr 1572352 / 256
mb=6142
+ print RAM Size: 6142 MB
RAM Size: 6142 MB

Something up with these lines?

hexval=$(echo "phys_mem_pages/A" | adb $kernel /dev/kmem | tail +2 | awk '{print $2}')
REAL_MEM=$(echo ${hexval}=D | adb)
mb=$(expr ${REAL_MEM} / 256)

From command line:

# echo "phys_mem_pages/A" | adb /stand/current/vmunix /dev/kmem|tail +2 |awk '{print $2}'
0x17fe00

no error - so that seems fine...

Try full:

hexval=$(echo "phys_mem_pages/A" | adb /stand/current/vmunix /dev/kmem|tail +2 |awk '{print $2}')

That's okay...

REAL_MEM=$(echo ${hexval}=D | adb)
adb: warning: No memory file specified ...
adb: warning: Using 'core'.
adb: warning: Object file not SOM ...
adb: warning: Shared library symbols could not be read.

Aha - what gives?

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.
12 REPLIES 12
Enrico P.
Honored Contributor
Solution

Re: ADB issue on 11iv2

rick jones
Honored Contributor

Re: ADB issue on 11iv2

Is it really a good idea to be using adb to try to pull those things from the kernel?

IIRC there is kctune to get the value of those tunables. Not sure about some of the other stuff if there is a way to grab them via a script, but it might be good to investigate to avoid using adb that way.
there is no rest for the wicked yet the virtuous have no pillows
Geoff Wild
Honored Contributor

Re: ADB issue on 11iv2

Can kctune get cpu and memory info?

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.
rick jones
Honored Contributor

Re: ADB issue on 11iv2

Not that I'm aware. At least some of that comes out of machinfo though.
there is no rest for the wicked yet the virtuous have no pillows
Geoff Wild
Honored Contributor

Re: ADB issue on 11iv2

Rick, but isn't /usr/contrib/bin/machinfo for IA64 only?

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.
rick jones
Honored Contributor

Re: ADB issue on 11iv2

I wasn't under that impression, but then I also don't have a PA-RISC system running 11.23 to try it on. Some of what you want may also be available via getconf
there is no rest for the wicked yet the virtuous have no pillows
James R. Ferguson
Acclaimed Contributor

Re: ADB issue on 11iv2

Hi Geoff:

According to the manpages, 'machinfo' is confined to Itanium processors only:

http://www.docs.hp.com/en/B2355-60105/machinfo.1.html

Regards!

...JRF...

Bill Hassell
Honored Contributor

Re: ADB issue on 11iv2

Nothing wrong with adb -- it has definitely undergone some changes to support IA64 but as has always been true, HP-UX symbols are subject to change without notice. It appears that adb's ability to convert a number to another base requires some changes (or may require use of bc instead). The warnings indicate that it expects a memory and object file.

I wrote a similar script to gather info from HP-UX versions 7.xx, 8.xx, 9.xx and 10.xx and there were kernel changes in every revision. Sorry, I don't have a list of the new or changed symbols.

Here's a link for 11v2 Release Notes. adb is covered on page 274:

http://docs.hp.com/en/5990-8153/5990-8153.pdf


Bill Hassell, sysadmin
rick jones
Honored Contributor

Re: ADB issue on 11iv2

Well, that's annoying - indeed the manpage does say IPF only - in something right up at the top in the header I often ignore :( and nothing in the text itself.
there is no rest for the wicked yet the virtuous have no pillows