- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Using adb for querying kernel
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 03:50 AM
тАО09-25-2006 03:50 AM
Using adb for querying kernel
- Tags:
- adb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 03:56 AM
тАО09-25-2006 03:56 AM
Re: Using adb for querying kernel
http://www.unet.univie.ac.at/aix/aixprggd/genprogc/custom_adb_debug.htm#A9Og40josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 04:00 AM
тАО09-25-2006 04:00 AM
Re: Using adb for querying kernel
title of the link :
"AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs"
Applicable in HP-UX forum ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 04:04 AM
тАО09-25-2006 04:04 AM
Re: Using adb for querying kernel
Agree. But it may give idea about adb. May be I am wrong.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 05:14 AM
тАО09-25-2006 05:14 AM
Re: Using adb for querying kernel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 07:43 AM
тАО09-25-2006 07:43 AM
Re: Using adb for querying kernel
# 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" " " | \
awk -F: '{print $3}'|\
read kval
}
hpux=/hp-ux
rev=$(uname -r | cut -d. -f2)
if ((rev > 9)); then hpux=/stand/vmunix ;fi
/bin/uname -a
# if 11iv2 or higher - get cpu this way
ver=$(uname -r | cut -d. -f3)
if ((ver > 22)); then
kval=`echo "processor_count/D" | adb /stand/vmunix /dev/kmem |tail -1|awk -F: '{print $2}' `
else
GetKernelSymbol "processor_count"
fi
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
# if 11iv2 or higher - get memory this way
ver=$(uname -r | cut -d. -f3)
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
For a single item:
echo "active_processor_count/D" | adb -o /stand/vmunix /dev/kmem
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2006 02:59 AM
тАО09-27-2006 02:59 AM
Re: Using adb for querying kernel
I have found that running glance the following way will also give me the info:
glance -j 900 -t -f /path/to/myfile.txt
I just grep for nflocks and nfile.