Operating System - HP-UX
1833111 Members
3432 Online
110051 Solutions
New Discussion

adb queries for /stand/vmunix.

 
SOLVED
Go to solution
Senthil Kumar .A_1
Honored Contributor

adb queries for /stand/vmunix.

Hi forumer's,..

I was wondering ,if there is a useful link where i can find
all useful queries that can be done on /stand/vmunix using adb
like, itick_per_tick,processor_count etc,etc....

Thanx.
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
2 REPLIES 2
Geoff Wild
Honored Contributor

Re: adb queries for /stand/vmunix.

Some info here:

http://docs.hp.com/en/B9106-90015/ch07s18.html

I have a script that uses it (I modified to include 11iv2):

# cat /usr/local/bin/hpmem
#!/bin/ksh
#
# Taken from the HP/UniGraphics FAQ
# You must be ROOT to execute this since it uses adb to
# examine the running kernel
#
GetKernelSymbol()
{
echo "$1/D" | \
adb $hpux /dev/kmem | \
tr "\012" " " | \
read junk junk2 kval
}
hpux=/hp-ux
rev=$(uname -r | cut -d. -f2)
if ((rev > 9)); then hpux=/stand/vmunix ;fi
/bin/uname -a
GetKernelSymbol "processor_count"
print CPU Count: $kval
GetKernelSymbol "itick_per_tick"
let speed=kval/10000
print CPU Speed: $speed MHz
if ((rev > 10)); then
print CPU HW Support: `getconf HW_CPU_SUPP_BITS`-bit
print Kernel Support: `getconf KERNEL_BITS`-bit
GetKernelSymbol "memory_installed_in_machine"
else
GetKernelSymbol "physmem"
fi
ver=$(uname -r | cut -d. -f3)
# if 11iv2 or higher - get memory this way
if ((ver > 22)); then
kernel=$(/usr/sbin/kcpath -x)
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)
else
let mb=kval*4/1024 # convert pages to MB
fi
print RAM Size: $mb MB
GetKernelSymbol "bufpages"
let mb=kval*4/1024 # convert pages to MB
print bufpages: $mb MB
GetKernelSymbol "maxuprc"
print maxuprc: $kval
GetKernelSymbol "maxvgs"
print maxvgs: $kval
GetKernelSymbol "maxfiles"
print maxfiles: $kval
GetKernelSymbol "max_thread_proc"
print max_thread_proc: $kval
GetKernelSymbol "nfile"
print nfile: $kval
GetKernelSymbol "nproc"
print nproc: $kval
GetKernelSymbol "ninode"
print ninode: $kval
GetKernelSymbol "vfd_cw"
print shmmax: $kval
GetKernelSymbol "shmmni"
print shmmni: $kval
GetKernelSymbol "dbc_max_pct"
print dbc_max_pct: $kval


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.
Devender Khatana
Honored Contributor
Solution

Re: adb queries for /stand/vmunix.

Hi,

Check the links. These are quitre useful.

http://docs.hp.com/en/J2237-90005/ch06s06.html

http://docs.hp.com/en/92432-90006/index.html

HTH,
Devender
Impossible itself mentions "I m possible"